Author Topic: Problems with scaling OpenGL lists.  (Read 2879 times)

0 Members and 1 Guest are viewing this topic.

Offline Pixel_Outlaw

  • Pentium
  • *****
  • Posts: 1382
  • Karma: 83
    • View Profile
Problems with scaling OpenGL lists.
« 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?
« Last Edit: January 23, 2008 by Pixel_Outlaw »
Challenge Trophies Won:

Offline stormbringer

  • Time moves by fast, no second chance
  • Amiga 1200
  • ****
  • Posts: 453
  • Karma: 73
    • View Profile
    • www.retro-remakes.net
Re: Problems with scaling OpenGL lists.
« Reply #1 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?
We once had a passion
It all seemed so right
So young and so eager
No end in sight
But now we are prisoners
In our own hearts
Nothing seems real
It's all torn apart

Offline Pixel_Outlaw

  • Pentium
  • *****
  • Posts: 1382
  • Karma: 83
    • View Profile
Re: Problems with scaling OpenGL lists.
« Reply #2 on: January 24, 2008 »
This is really odd. Here is the code taken directly from the second character.

Code: [Select]
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()
Challenge Trophies Won: