Skip to main content
GameDev.net gamedev.net
🔒 Locked

GLEE problems

Started by bootstrap Apr 6, 2006 at 2:21 AM 6 replies 3.2k views
Original Post
bootstrap
bootstrap
I have a simple OpenGL program running (create, display, clear window), but cannot make the GLEE extensions mechanism work. I just downloaded and installed the latest version today, so it isn't an "old version problem". The GLeeInit() function fails (returns zero), after which I call the GLeeGetErrorString() function which says "GL extension querying failed". Anyone know what is the problem? BTW, I get the same result whether I include the glee.h and glee.c files in my program (and include "glee.h") OR link to the glee.lib file and include them with at the top of my code. My system is Athlon64 4400+ with WindowsXP 64-bit edition with Visual Studio 2005 (compiling 32-bit program).
LorenzoGatti
LorenzoGatti
Can you query extensions by other means? It might not be a GLee problem.
Omae Wa Mou Shindeiru
dotproduct
dotproduct
Do you call GLeeInit() before or after you've created you rendering context (i.e. your window)?
It should be after...

In addition, you don't have to call GleeInit() yourself, it is handled automatically when you query an extension or gl version.

e.g.

if(GLEE_ARB_multitexture)
....

if(GLEE_VERSION_2_0)
...
bootstrap
bootstrap
Quote:
Original post by LorenzoGatti
Can you query extensions by other means? It might not be a GLee problem.
I have no idea - I included this library to avoid learning how to do it manually. I guess I could try GLEW and see if that works. Why might OpenGL extensions not work at all?
dotproduct
dotproduct
Quote:
Original post by bootstrap
I have no idea - I included this library to avoid learning how to do it manually.


char* extensions = (char*)glGetString(GL_EXTENSIONS);if(strstr(extensions, "GL_ARB_multitexture")).....
bootstrap
bootstrap
Quote:
Original post by dotproduct
Do you call GLeeInit() before or after you've created you rendering context (i.e. your window)?
It should be after...

In addition, you don't have to call GleeInit() yourself, it is handled automatically when you query an extension or gl version.

e.g.

if(GLEE_ARB_multitexture)
....

if(GLEE_VERSION_2_0)
...
Bingo!!! Excellent guess. Not that I understand why this order would matter, but at least I can play now. Thanks much.

I called GLeeInit() in desperation when I found no variable like GLEE_VERSION_1_3 or GLEE_VERSION_2_0 or GLEE_WGL_EXT_swap_control would return a non-zero value, and same for wglGetProcAddress("names") where "names" was many reasonable function names.
dotproduct
dotproduct
Quote:
Original post by bootstrap
Bingo!!! Excellent guess. Not that I understand why this would matter, but at least I can play now. Thanks much.

It matters because before a GL rendering context is created, Glee (or GL rather) cannot possibly know what kind of video card and/or driver it will be using.
NamelessTwo
NamelessTwo
The latest GLee version does not need GLeeInit() to be called.

Quote:
Original post by bootstrap
Quote:
Original post by dotproduct
Do you call GLeeInit() before or after you've created you rendering context (i.e. your window)?
It should be after...

In addition, you don't have to call GleeInit() yourself, it is handled automatically when you query an extension or gl version.

e.g.

if(GLEE_ARB_multitexture)
....

if(GLEE_VERSION_2_0)
...
Bingo!!! Excellent guess. Not that I understand why this order would matter, but at least I can play now. Thanks much.

I called GLeeInit() in desperation when I found no variable like GLEE_VERSION_1_3 or GLEE_VERSION_2_0 or GLEE_WGL_EXT_swap_control would return a non-zero value, and same for wglGetProcAddress("names") where "names" was many reasonable function names.


Another nameless person in the virtual space...

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.