When I run this block of code:
glLineWidth(1.0f);
glBegin(GL_LINES);
glColor3ub(255, 0, 0);
glVertex3d(0.0, 0.0, 0.0);
glVertex3d(10.0, 0.0, 0.0);
glColor3ub(0, 255, 0);
glVertex3d(0.0, 0.0, 0.0);
glVertex3d(0.0, 10.0, 0.0);
glColor3ub(0, 0, 255);
glVertex3d(0.0, 0.0, 0.0);
glVertex3d(0.0, 0.0, 10.0);
glEnd();
glColor3ub(0, 0, 0);
I must include the glColor3ub() after the glEnd() before I get to a later glMultiDrawElements() call.
Otherwise, I get an access violation exception from the function GLeeGetExtensions() in GLee.c. I am using GLee version 5.4. In GLee documentation I found that a fix was added in version 5.32 to fix a potential access violation exception in GLeeGetExtensions(). The code appears to work if I keep the glColor3ub() call, however this is very unstable. Please help.
Thank you,
Robert