Dark Bit Factory & Gravity

PROGRAMMING => General coding questions => Topic started by: Pixel_Outlaw on January 23, 2008

Title: Problems with scaling OpenGL lists.
Post by: Pixel_Outlaw on January 23, 2008
I didn't want to muddy my font program topic with questions but for some reason, sometimes the fonts have small breaks in them. The breaks never seem to be more than one pixel wide but it seems that a gl_line_strip should never produce a broken line. I've saved the points as floating point variables even so I don't think it is an integer to float problem. Any thoughts?
Title: Re: Problems with scaling OpenGL lists.
Post by: stormbringer on January 24, 2008
if you use GL_LINES as a primitive, this could be the problem. The line drawing in GL paradigm (like anywhere else) draws a line from the first point to the last one but NOT including the last one. This way, when drawing connected lines with GL_LINES will give you the same result as GL_LINE_STRIP. Did you check if your vertices are connected?
Title: Re: Problems with scaling OpenGL lists.
Post by: Pixel_Outlaw on January 24, 2008
This is really odd. Here is the code taken directly from the second character.


glNewList(name_here+1, GL_COMPILE)
    glBegin(GL_LINE_STRIP)
        glcolor3f(0.345098048 ,0.485049009 ,0.312500000)
        glVertex3f(0.125000000,0.500000000,0.000000000)
        glcolor3f(0.000000000 ,1.00000000 ,1.00000000)
        glVertex3f(0.125000000,-0.875000000,0.000000000)
        glcolor3f(0.000000000 ,1.00000000 ,1.00000000)
        glVertex3f(-0.125000000,-0.875000000,0.000000000)
        glcolor3f(0.345098048 ,0.485049009 ,0.312500000)
        glVertex3f(-0.125000000,0.500000000,0.000000000)
        glcolor3f(0.345098048 ,0.485049009 ,0.312500000)
        glVertex3f(0.125000000,0.500000000,0.000000000)
        glcolor3f(0.376470625 ,0.438235283 ,0.250000000)
        glVertex3f(-0.125000000,0.625000000,0.000000000)
        glcolor3f(0.439215720 ,0.344607830 ,0.125000000)
        glVertex3f(-0.125000000,0.875000000,0.000000000)
        glcolor3f(0.439215720 ,0.344607830 ,0.125000000)
        glVertex3f(0.125000000,0.875000000,0.000000000)
        glcolor3f(0.376470625 ,0.438235283 ,0.250000000)
        glVertex3f(0.125000000,0.625000000,0.000000000)
        glcolor3f(0.376470625 ,0.438235283 ,0.250000000)
        glVertex3f(-0.125000000,0.625000000,0.000000000)
    glEnd()
glEndList()