Jump to content
  • Advertisement
Sign in to follow this  
bootstrap

OpenGL GLEE problems

This topic is 4518 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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 <gl/glee.h> at the top of my code. My system is Athlon64 4400+ with WindowsXP 64-bit edition with Visual Studio 2005 (compiling 32-bit program).

Share this post


Link to post
Share on other sites
Advertisement
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)
...

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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"))
.....


Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.


Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!