View Full Version : glPushAttrib/glPopAttrib side effects?

James W. Walker
11-17-2011, 03:46 PM
I'm trying to track down a rendering problem that only seems to happen with Intel graphics cards. (Objects that should be colored sometimes appear white.) I discovered that if, at a certain point in the code, I insert


then the bug goes away. Should this tell me anything, other than "avoid Intel graphics"?

11-18-2011, 06:10 AM
Fascinating stuff. I'd a similar problem with vertex attrib arrays on an Intel 945, and taking a hint from your post, I added this pair just before my glEnableVertexAttribArray calls and it completely resolved it. A bit more experimenting and it seems that glPushClientAttrib (GL_CLIENT_VERTEX_ARRAY_BIT)/glPopClientAttrib () is also sufficient.

This only happened with vertex attrib arrays; using regular old-school vertex arrays didn't have the problem. Oddly enough, if I drew the first frame using old-school vertex arrays but all subsequent frames using attrib arrays, the problem also didn't happen. Sound familiar to your case?

James W. Walker
11-18-2011, 10:23 AM
Well, I've never used glEnableVertexAttribArray, just old-school vertex/normal/uv arrays.