Jump to content
  • Advertisement
Sign in to follow this  
renderkid

OpenGL glew does not initializes extensions

This topic is 832 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

Hi all,

 

Today I occured quite interesting problem and I really do not know why it is like this. So I though maybe any of you will have an answer to this problem.

The problem:
In my engine I have renderer.dll that deals with all rendering.

The .exe file manages windows and creates OpenGL rendering context.

If I try to initialize glew in .exe file. My .dll renderer can not use any opengl code because for some reasons it's not getting those extensions that were loaded successfully in .exe application.

   

If I load extension in renderer.dll, everything then works fine.

 

Any ideas why it is like this?
Thanks.
 

Share this post


Link to post
Share on other sites
Advertisement

Hi.

 

Have you initialized GLEW (called glewInit()) after creating an OpenGL context?

 

EDIT:

 

I mean, if it works when you initialize it in the DLL, then maybe it's because you initialize the DLL after you've created the window and an OpenGL context.

And perhaps it doesn't work when you initialize it in the EXE, because you're initializing GLEW before you've created an OpenGL context (and the window, maybe).

Edited by __SKYe

Share this post


Link to post
Share on other sites

Or you are linking GLEW statically which means executable and DLL both have their own distinct copy of GLEW and the copy you are initializing is not the copy used for further rendering.

Share this post


Link to post
Share on other sites

Or you are linking GLEW statically which means executable and DLL both have their own distinct copy of GLEW and the copy you are initializing is not the copy used for further rendering.

Yup, I was using static lib. I see now :D :D . That makes sense. Thanks a lot :D

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!