glew does not initializes extensions

Started by
2 comments, last by renderkid 8 years ago

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.

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).

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.

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

This topic is closed to new replies.

Advertisement