glPushAttrib/glPopAttrib side effects?

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


glPushAttrib(0);
glPopAttrib();

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

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?

Well, I’ve never used glEnableVertexAttribArray, just old-school vertex/normal/uv arrays.