|
@@ -1994,6 +1994,16 @@ void CParticle::renderSprites () {
|
|
|
while (glGetError () != GL_NO_ERROR)
|
|
while (glGetError () != GL_NO_ERROR)
|
|
|
;
|
|
;
|
|
|
|
|
|
|
|
|
|
+#if !NDEBUG
|
|
|
|
|
+
|
|
|
|
|
+ std::string str = "Rendering particles ";
|
|
|
|
|
+
|
|
|
|
|
+ str += this->getParticle ().name + " (" + std::to_string (this->getId ()) + ", " + this->getParticle ().particleFile
|
|
|
|
|
+ + ")";
|
|
|
|
|
+
|
|
|
|
|
+ glPushDebugGroup (GL_DEBUG_SOURCE_APPLICATION, 0, -1, str.c_str ());
|
|
|
|
|
+#endif
|
|
|
|
|
+
|
|
|
// Save current GL state before any modifications
|
|
// Save current GL state before any modifications
|
|
|
GLint prevProgram = 0;
|
|
GLint prevProgram = 0;
|
|
|
GLint prevVAO = 0;
|
|
GLint prevVAO = 0;
|
|
@@ -2190,4 +2200,8 @@ void CParticle::renderSprites () {
|
|
|
glBindTexture (GL_TEXTURE_2D, prevTexture);
|
|
glBindTexture (GL_TEXTURE_2D, prevTexture);
|
|
|
glBindBuffer (GL_ARRAY_BUFFER, prevArrayBuffer);
|
|
glBindBuffer (GL_ARRAY_BUFFER, prevArrayBuffer);
|
|
|
glBindVertexArray (prevVAO);
|
|
glBindVertexArray (prevVAO);
|
|
|
|
|
+
|
|
|
|
|
+#if !NDEBUG
|
|
|
|
|
+ glPopDebugGroup ();
|
|
|
|
|
+#endif
|
|
|
}
|
|
}
|