Skip to main content
1 of 6

Why opengl code in a lib doesn't renderer?

I am experimenting with opengl using c99 i tried to create an window using glfw in one project and put a function that supposed to generate a texture in another project that is compiled into static library (.lib) and linked to the first project that creates the window when i run the program it crashes put when i copy the code from the func to the first project the texture render probably when debugging the func before the crash the value returned from glGenTextures equal 1so i think it can't render to the opengl context or i am wrong could any one tell me what is happens or is it normal and is there a work around