Ok, it looks like I have had calls to glGenTextures(), glBindTexture(), glTexImage2D() and glTexParameteri() without surrounding Push/PopGLStates(). I.e. I forgot to save the texture states. This ancient Pre-Thor particle system in a project of mine, I hate it and need to replace it ASAP...
But also in Thor, I have stored too few attributes. Now I use
glPushAttrib(GL_COLOR_BUFFER_BIT | GL_TEXTURE_BIT | GL_TRANSFORM_BIT | GL_ENABLE_BIT);
But I'm not sure whether I store too few or too much. How can I find it out? I've looked up the
DGL wiki, but the attributes are described only briefly. I could also store GL_ALL_ATTRIB_BITS, but that would probably be unnecessarily slow... I'm using these OpenGL functions:
glDisable(GL_DEPTH_TEST);
glEnable(GL_TEXTURE_2D);
glEnable(GL_BLEND);
...
mTexture->Bind(); // sf::Texture
... // Push projection, texture, modelview matrix
// Draw particles in modelview matrix
glLoadIdentity();
glTranslatef(...);
glRotatef(...);
glScalef(...);
glColor4ub(...);
glBegin(GL_TRIANGLE_STRIP);
...
glEnd();
And I could try to use sf::VertexArray in the future. But some OpenGL knowledge isn't bad either, since I'm not really experienced