OpenGL 3.3

BlitzMax Forums/OpenGL Module/OpenGL 3.3

Polan(Posted 2011) [#1]
Recently I got superbible to learn opengl 3.3, mostly because my actual engine used 2.1 opengl and I wanted to upgrade it.
I downloaded glew 1.6, replaced .h and .cpp files in pub.glew, run glew2bmx, copied result to glew.bmx, rebuild module.
Now when I try to call glCreateProgram or glCreateShader it fails with error EXPECTION_ACESS_VIOLATION even on debug. My gcard is 540m with newest driver.
glGetString( GL_VERSION ) returns 4.1 version.
Code I use works in my older engine, I tried also glCreatePRogramOBjectARB but it also fails.
Any ideas what could be wrong?


Also I had to remove max2d modules to compile glew.mod.

also I get this while running glew2bmx

DebugLog:***** __glewDebugMessageCallbackAMD *****
DebugLog:***** __glewCreateSyncFromCLeventARB *****
DebugLog:***** __glewDebugMessageCallbackARB *****
DebugLog:***** __glewClientWaitSync *****
DebugLog:***** __glewDeleteSync *****
DebugLog:***** __glewFenceSync *****
DebugLog:***** __glewGetSynciv *****
DebugLog:***** __glewIsSync *****
DebugLog:***** __glewWaitSync *****
DebugLog:***** __glewImportSyncEXT *****
DebugLog:***** __glewVDPAUGetSurfaceivNV *****
DebugLog:***** __glewVDPAUIsSurfaceNV *****
DebugLog:***** __glewVDPAUMapSurfacesNV *****
DebugLog:***** __glewVDPAURegisterOutputSurfaceNV *****
DebugLog:***** __glewVDPAURegisterVideoSurfaceNV *****
DebugLog:***** __glewVDPAUSurfaceAccessNV *****
DebugLog:***** __glewVDPAUUnmapSurfacesNV *****
DebugLog:***** __glewVDPAUUnregisterSurfaceNV *****


Last edited 2011

Last edited 2011


Polan(Posted 2011) [#2]
Ok nvm.. I wasted 5h on searching for solution and the bug was....
glewinit()
glgraphics()

instead of
glGraphics()
glewinit()