Skip to main content
GameDev.net gamedev.net
🔒 Locked

Help needed...

Started by KumGame Jun 14, 2006 at 12:49 AM 2 replies 450+ views
Original Post
KumGame
KumGame
Hi all.. This is related to my previous post.. I just wanna know that in what all circumstances 'glGetError()' will return GL_INVALID_VALUE ? I'm getting this error while swapping buffers (aglSwapBuffers(Ctx)) As Mars had suggested last time, I can't use Cocoa right now. I have used Carbon and now not in a position ditch it. Any help will be greatly appreciated :-)
hplus0603
hplus0603
In a whole bunch of places, unfortunately.

Are you calling assert(!glGetError()) at the beginning and end of each of your functions that call GL? If not, I suggest adding that, as finding the error earlier will make it easier to find.

Also, I don't know if GLIntercept or gDebugger exist for MacOS X, but if they do, they're great tools for finding errors!
enum Bool { True, False, FileNotFound };
Will F
Will F
It's been awhile since i've worked directly with OpenGL, but my man page (OS X 10.4) for glGetError() says this about GL_INVALID_VALUE
Quote:
A numeric argument is out of range. The offending command is ignored, and has no other side effect than to set the error flag.



I suspect that the error is being generated somewhere else, try calling glGetError() immediately before swapping the buffers (which should set the flag to GL_NO_ERROR), then call it again after swapping them - and see if you're still getting GL_INVALID_VALUE. More from the man page

Quote:
When an error occurs, the error flag is set to the appropriate error code value. No other errors are recorded until glGetError is called, the error code is returned, and the flag is reset to GL_NO_ERROR.



Also, a quick look at the AGL docs suggests that errors with AGL functions can be found with aglGetError(). Try calling that after swapping the buffers and see if the call to aglSwapBuffers() is producing any errors.
KumGame
KumGame
Thanks ...

I tried it. But sadly, it didn work.. I'll try som other way to get rid of the problem. I'll surely come up with som other problem next time :-) :-(

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.