<legend id='kGDPA'><style id='kGDPA'><dir id='kGDPA'><q id='kGDPA'></q></dir></style></legend>

        <bdo id='kGDPA'></bdo><ul id='kGDPA'></ul>

        <small id='kGDPA'></small><noframes id='kGDPA'>

        <tfoot id='kGDPA'></tfoot>

        <i id='kGDPA'><tr id='kGDPA'><dt id='kGDPA'><q id='kGDPA'><span id='kGDPA'><b id='kGDPA'><form id='kGDPA'><ins id='kGDPA'></ins><ul id='kGDPA'></ul><sub id='kGDPA'></sub></form><legend id='kGDPA'></legend><bdo id='kGDPA'><pre id='kGDPA'><center id='kGDPA'></center></pre></bdo></b><th id='kGDPA'></th></span></q></dt></tr></i><div id='kGDPA'><tfoot id='kGDPA'></tfoot><dl id='kGDPA'><fieldset id='kGDPA'></fieldset></dl></div>

        OpenGL 线宽

        时间:2023-09-18

        1. <i id='OTseu'><tr id='OTseu'><dt id='OTseu'><q id='OTseu'><span id='OTseu'><b id='OTseu'><form id='OTseu'><ins id='OTseu'></ins><ul id='OTseu'></ul><sub id='OTseu'></sub></form><legend id='OTseu'></legend><bdo id='OTseu'><pre id='OTseu'><center id='OTseu'></center></pre></bdo></b><th id='OTseu'></th></span></q></dt></tr></i><div id='OTseu'><tfoot id='OTseu'></tfoot><dl id='OTseu'><fieldset id='OTseu'></fieldset></dl></div>
            <tbody id='OTseu'></tbody>

        2. <legend id='OTseu'><style id='OTseu'><dir id='OTseu'><q id='OTseu'></q></dir></style></legend>

              <tfoot id='OTseu'></tfoot>

                • <bdo id='OTseu'></bdo><ul id='OTseu'></ul>

                  <small id='OTseu'></small><noframes id='OTseu'>

                  本文介绍了OpenGL 线宽的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  在我的 OpenGL 应用程序中,它不会让我画一条大于十像素宽的线.有没有办法让它画十个像素以上?

                  In my OpenGL app, it won't let me draw a line greater then ten pixels wide. Is there a way to make it draw more than ten pixels?

                  void OGL_Renderer::drawLine(int x, int y, int x2, int y2, int r, int g, int b, int a, int line_width)
                  {   
                      glColor4ub(r, g, b, a);
                  
                      glLineWidth((GLfloat)line_width);
                      glBegin(GL_LINES);
                      glVertex2i(x, y);
                      glVertex2i(x2, y2);
                      glEnd();
                      glLineWidth(1.0f);
                  }
                  

                  推荐答案

                  您可以尝试绘制四边形.使其宽度与您希望的线条一样长,高度与所需的线条宽度相同,然后旋转并将其定位到线条所在的位置.

                  You could try drawing a quad. Make it as wide as you want your line to be long, and tall as the line width you need, then rotate and position it where the line would go.

                  这篇关于OpenGL 线宽的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:在 OpenGL 中绘制球体而不使用 gluSphere()? 下一篇:opengl 中的对象加载器

                  相关文章

                  最新文章

                • <legend id='wZRul'><style id='wZRul'><dir id='wZRul'><q id='wZRul'></q></dir></style></legend>

                  <tfoot id='wZRul'></tfoot>

                    <i id='wZRul'><tr id='wZRul'><dt id='wZRul'><q id='wZRul'><span id='wZRul'><b id='wZRul'><form id='wZRul'><ins id='wZRul'></ins><ul id='wZRul'></ul><sub id='wZRul'></sub></form><legend id='wZRul'></legend><bdo id='wZRul'><pre id='wZRul'><center id='wZRul'></center></pre></bdo></b><th id='wZRul'></th></span></q></dt></tr></i><div id='wZRul'><tfoot id='wZRul'></tfoot><dl id='wZRul'><fieldset id='wZRul'></fieldset></dl></div>
                    1. <small id='wZRul'></small><noframes id='wZRul'>

                      • <bdo id='wZRul'></bdo><ul id='wZRul'></ul>