PDA

View Full Version : Unexplainable Error in gDEBug



_ShaderRookie_
03-23-2011, 02:20 PM
I have put my code on pastebin, because it has hightlighting and Linenumbers, which makes it easier:
http://pastebin.com/1Fwywctk

The Error:


OpenGL Debug Output: API Error, glGetShaderiv parameter <shader> has an invalid value '1': must be a valid shader object name (GL_INVALID_VALUE)

http://h-4.abload.de/img/glerrorjq3e.png

Now, I use only 1 glShaderiv Function and there is no error.
Also, in my Code glError() returns nothing but GL_NO_ERROR.
According to gDEBug, my Error is on Line 60, when I look at the Stacktrace.
But when I place a check there, everything is okay.
Maybe it is a problem with the drivers?
In gDEBug it also says I have compability profile for OpenGL 3.3, but when I query the GL_VERSION, it says Core, as I requested. Very weird.
I use a HD4890 with the latest ATI Drivers.
Thanks for any help, I really can't solve it.

_ShaderRookie_
03-26-2011, 09:57 AM
No one able to help?
Did I forget any Information?

Dark Photon
03-26-2011, 10:45 AM
Well, I'd double check gDEBugger. Everytime you create a shader, print the handle. Also print when this glGetShader call is being done and the handle you're passing. Make sure one of the handles created is 1, and that it was in fact created before the glGetShader call.

Failing that, it's possible there's a bug in gDEBugger. I've found a number over the years and got the Graphic Remedy guys to fix them. They were very responsive.

_ShaderRookie_
03-26-2011, 10:52 AM
Hm, well I guess I am gonna file it to Remedy then.
I have debugged my application from top to bottom and I really can say that there is no obvious error in my code.
Also, as said, glGetError does not return any faults, only GL_NO_ERROR.
I was just getting unsure about it :D.

Dark Photon
03-26-2011, 10:55 AM
Well, you could post a snippet here. That said, I do this glGetShaderiv call regularly and never have had any problems with it in gDEBugger:



glGetShaderiv( shader, GL_COMPILE_STATUS, &amp;res );