visual c++ - glDrawElements flicker and crash -
I am getting a glitch error while using glDrawElements () I have to simplify the line of text to simplify primitives (Mainly rectangles), but when I call glDrawElements (), the whole screen blinks black for one frame (not just my window area), the next limit is the first Returns to "Windows colors" as well and so it's something from Flicker for the message ends in the message box box
NVIDIA OpenGL driver encountered an unreadable error and should close this application Error 12
Is there a setting for GL that I need to reset before calling glDrawElements ()? I know that this is not something glEnableClientState (), I checked it (I was one of those, but then crashing instead of glDrawElements ())
Come to think about it, it looks almost like some back buffer error ... Any ideas to try?
Obviously you are mixing VBO mode and VA mode. It is completely possible but should be used with care.
When you call:
glBindBuffer (GL_ARRAY_BUFFER, 0); Glubbind Buffer (GL_ELEMENT_ARRAY_BUFFER, 0);
This means that the next time you render something with glDrawElements (..., ..., ..., x)
, then This will use as the pointer on index data, and last call for glVertexPointer points on cholera data.
If you do not no current VBO and IBO (two globalbuff calls given above), this means that when rendering with similar glDrawElements, Strong> In the IBO index data will be used as offset, and glVertexPointer as the offset on the virtual data in last call VBO
Depending on the values of x and glVertexPointer, you can create driver crashes because the offset exceeds the limit and / or the underlying data is of the wrong type (NaN).
/ li>
glVertexPointer
glDrawElements
with correct index address Specify and then it will be fine.
Comments
Post a Comment