Closed tcsavage closed 10 years ago
Upon returning to have another look at this I have discovered the source of my confusion: it turns out that gDEBugger just doesn't see all of the GL function calls made by the library (for some reason) and can't track the context state correctly. This coupled with my forgetting to set a texture filter (hence the texture not displaying) let me to falsely assume something weird was going on with the library not calling functions.
My problem has resolved itself, feel free to close this issue.
I have encountered a very strange issue on Windows where functions are located (or at least searched for) by
wglGetProcAddress
but never seem to be called. I first encountered this problem when trying to create some textures but seems to be a much larger problem.Here is a fairly minimal test case which illustrates the problem.
This should simply load a texture and display it, but all I see is a white screen. I have executed this program under gDEBugger and the following is a log of all the OpenGL-related function calls it saw:
As you can see, while there are a couple of GL functions executed, most of them aren't. What's weirder still is that even though
glGenTextures
never seems to be executed,textureObject
still seems to get a value.It seems to me like the functions aren't being located correctly, but if that's the case, where does the value of
textureObject
come from? And shouldn't it be erroring instead?Any idea what's going on here?
GHC 7.6.3 OpenGLRaw 1.4 OpenGL 2.9 GLUT 2.5