Hello Guest

LWJGL with GLIntercept

  • 5 Replies
  • 8502 Views
*

Offline Momoko_Fan

  • *
  • 38
  • jME3 lead developer
LWJGL with GLIntercept
« on: February 16, 2009, 01:18:50 »
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?

*

Offline Matzon

  • *****
  • 2242
Re: LWJGL with GLIntercept
« Reply #1 on: February 16, 2009, 08:56:51 »
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!)

*

Offline Momoko_Fan

  • *
  • 38
  • jME3 lead developer
Re: LWJGL with GLIntercept
« Reply #2 on: February 16, 2009, 17:27:13 »
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.

*

Offline tomb

  • ***
  • 148
Re: LWJGL with GLIntercept
« Reply #3 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.

*

Offline Momoko_Fan

  • *
  • 38
  • jME3 lead developer
Re: LWJGL with GLIntercept
« Reply #4 on: February 18, 2009, 02:15:40 »
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
Code: [Select]
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)?

*

Offline Momoko_Fan

  • *
  • 38
  • jME3 lead developer
Re: LWJGL with GLIntercept
« Reply #5 on: April 14, 2009, 14:16:51 »
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.