LWJGL with GLIntercept

Started by Momoko_Fan, February 16, 2009, 01:18:50

Previous topic - Next topic

Momoko_Fan

I tried using GLIntercept to track GL calls but apparently LWJGL automatically uses it's own version of opengl32.dll :( Is there any way to override that?

Matzon

no it doesn't! - something else must be wrong! (not even an opengl32.dll in the zip file! - we would have to supply one for each graphics card vendor!)

Momoko_Fan

Erm, I mean regardless of what I try, the opengl32.dll I provide in the working directory is ignored and the file in C:\Windows\System32\opengl32.dll is used.

tomb

I think you have to use the working directory of the jre. I think it is the bin folder.

Momoko_Fan

Quote from: tomb on February 17, 2009, 15:01:33
I think you have to use the working directory of the jre. I think it is the bin folder.
Thanks! That worked. Though now I have a different issue.. when running through GLIntercept, I am getting "Invalid operation (1282)". GLIntercept reports it as:
"GL ERROR - Function wglGetPixelFormat generated error GL_INVALID_OPERATION"

This is the part of the log that is important
wglSwapIntervalEXT(1)=true 
glGetError()=GL_NO_ERROR 
glClear(GL_COLOR_BUFFER_BIT)
wglGetCurrentContext()=0x10000 
wglMakeCurrent(0x340119e4,0x10000)
----->wglGetPixelFormat(0x340119e4)=7 =true 
glGetError()=GL_NO_ERROR 
wglSwapBuffers(0x340119e4)
----->wglGetPixelFormat(0x340119e4)=7 =true 
wglGetPixelFormat(0x340119e4)=7  
glGetError()=GL_INVALID_OPERATION


I am running on nVidia GeForce 8400M GS with driver 185.20 [Dox Optimized], OpenGL3 compatible. Is it possible that GLIntercept doesn't work well with the new nvidia drivers (or OGL3)?

Momoko_Fan

By the way, I found the solution. ::) If anybody is interested, you should catch the exception happening in glGetError(), it's because LWJGL makes GL calls before the context is current and GLIntercept doesn't really like it (it's a known issue). Other than that it seems to work fine.
I would strongly suggest to use GLSL Devil instead though, it's much better, has GUI, and doesn't have the aforementioned error.