GL_STACK_UNDERFLOW error?

Alright, the graphics gremlins have come alive in my computer. Don’t know why, but now when I call glVertexPointer() before a call to glDrawElements() I get a GL_STACK_UNDERFLOW error. First of all, what is a stack underflow? Is that like the dry heaves? Secondly, why would glVertexPointer be doing anything to any of glStacks? Does it internally do something similar to glPushAttrib() or something? This is the first time glVertexPointer() gets called in my application, and vertex arrays are enabled at the time of the call.

Also, this is in software(I know, ick). New machine with GeForce2 gts is being ordered(and there was much rejoicing).

J

I sorta doublt if this problem has much to do with your glVertexPointer call.

GL_STACK_UNDERFLOW error actually is sortof like the dry heaves. It means you are Popping more than you are Pushing, and there is nothing more on the stack to pop. GL_STACK_OVERFLOW error means just the opposite, you have pushed too much and the stack is full.

Make sure that you only have one glPush* for every glPop*. He he, it says Pop Star

Zeno

I bet you get the same errorcode if you call glGetError() BEFORE glVertexPointer() aswell.

But as Zeno said, you probably have too many glPop*()s.

Pop Star. Hahaha.

Alright, not that funny. At any rate, yes, I am popping before pushing(I figure this won’t have any side effects. Only happens when my program initializes). However, why would this be the error returned for glVertexPointer? if this error were generated earlier, would it not be cleared after the next successful gl call?

J

Alright, nm this question. Figured out what the issue really is. posting new topic.

J

Errors remain untill you call glGetError(). They are not overwritten when new errors occur, nor are they cleard on a successfull command. That is why you get the same error before and after the call to glVertexPointer(). Theoretically your call to glVertexPointer() can have errors aswell, but since there already is an error, a new one won’t occur. It won’t even occur after the other one, like in a queue of errors.