Sign in to follow this  

Help needed...

This topic is 4201 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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 :-)

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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 :-) :-(

Share this post


Link to post
Share on other sites

This topic is 4201 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this