PDA

View Full Version : unexpected results with GL_LINES



Tcll5850
11-18-2014, 11:05 AM
yes, I'm using the FFP like a noob, but the interface I'm working on is scrap anyways...

I'm having a little problem with this code:


__GL.glLineWidth(3.5)

__GL.glBegin(GL_LINES)
__GL.glColor3f(1,1,1)
__GL.glVertex3f(CBL[0]*CBS[0],CBL[1]*CBS[1],CBL[2]*CBS[2])
__GL.glColor3f(0.5,0.5,0.5)
__GL.glVertex3f(CBL[0]*CBS[0],CBL[1]*CBS[1],CBL[2]*CBS[2])
__GL.glEnd()

__GL.glEnable(GL_LINE_STIPPLE)
__GL.glLineStipple(1, 0xAAAA) # [1]
__GL.glLineWidth(1.0)

__GL.glBegin(GL_LINES)
__GL.glColor3f(0,0,0)
__GL.glVertex3f(CBL[0]*CBS[0],CBL[1]*CBS[1],CBL[2]*CBS[2])
__GL.glVertex3f(PBL[0]*PBS[0],PBL[1]*PBS[1],PBL[2]*PBS[2])
__GL.glEnd()

__GL.glDisable(GL_LINE_STIPPLE)


the code is used to show bone relations being:
thick line white (bone head) to gray (bone tail)
dotted thin black line showing parent/child relations

the problem:
everything draws thin and black

how do I fix??

GClements
11-18-2014, 02:38 PM
GL.glBegin(GL_LINES)
GL.glColor3f(1,1,1)
GL.glVertex3f(CBL[0]*CBS[0],CBL[1]*CBS[1],CBL[2]*CBS[2])
GL.glColor3f(0.5,0.5,0.5)
GL.glVertex3f(CBL[0]*CBS[0],CBL[1]*CBS[1],CBL[2]*CBS[2])
GL.glEnd()

Note that both vertices have identical positions, i.e. the line has zero length.

Tcll5850
11-18-2014, 05:05 PM
._.
wow did I really just make that dumb of a mistake...

...
I certainly did >3<
sorry guys, carry on