Commits

David Rogers  committed 652b43b

Bug 480: Fix GLSLESProgramManagerCommon compilation under Win32.

  • Participants
  • Parent commits 6bfdce9
  • Branches v1-8

Comments (0)

Files changed (1)

File RenderSystems/GLES2/src/GLSLES/src/OgreGLSLESProgramManagerCommon.cpp

 		// Scan through the active uniforms and add them to the reference list
 		GLint uniformCount = 0;
         GLint maxLength = 0;
+		char* uniformName = NULL;
 
 		glGetProgramiv(programObject, GL_ACTIVE_UNIFORM_MAX_LENGTH, &maxLength);
         GL_CHECK_ERROR;
         if(maxLength == 0)
             return;
 
-		char uniformName[maxLength];
+		uniformName = OGRE_NEW char[maxLength + 1];
 		GLUniformReference newGLUniformReference;
 
 		// Get the number of active uniforms
 				// user params
 			} // end if
 		} // end for
+		
+		if( uniformName != NULL ) 
+		{
+			OGRE_DELETE uniformName;
+		}
 	}
 	//---------------------------------------------------------------------
 	void GLSLESProgramManagerCommon::extractConstantDefs(const String& src,