PDA

View Full Version : GLeeGetExtensions access violation



robertmachardy
04-24-2009, 08:04 AM
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

robertmachardy
04-27-2009, 05:44 AM
Please help.

Thank you,
Robert

robertmachardy
04-28-2009, 07:34 AM
Please help.

Thank you,
Robert

robertmachardy
04-30-2009, 04:39 AM
Please help.

Thank you,
Robert

robertmachardy
04-30-2009, 12:07 PM
I still don't understand the problem I was having before. But I have since switched to using GLEW, and I know longer have the odd program crash. GLEW does not have lazy initialization, therefore I must call glewInit() each time I switch to a different rendering context. A call to glewInit() appears to take a long time to complete, which is not a surprise considering what it does. This lenghthy call should not be an issue as long as I don't switch contexts very frequently.

Would someone please comment on GLEE vs GLEW? I would really appreciate a response.

ZbuffeR
04-30-2009, 12:13 PM
I only used GLEW.

dletozeun
04-30-2009, 03:37 PM
Like ZbuffeR i am used to GLEW, but if the last version of Glee is buggy you can try to use a previous one if possible. The ultimate solution is to make the effort to write your own extension loader and load only the extensions you need. It is not that bad.