Commits

Cliff Biffle committed 4b5125f

Rearranged GL init code in KVRenderer.

Comments (0)

Files changed (1)

   glLinkProgram(program);
   glUseProgram(program);
   
-  glEnable(GL_POINT_SPRITE);
-  glEnable(GL_VERTEX_PROGRAM_POINT_SIZE);
-
   GLint depthUniform = glGetUniformLocation(program, "depthTex");
   glUniform1i(depthUniform, 0);
   
   GLint colorUniform = glGetUniformLocation(program, "colorTex");
-  glUniform1i(colorUniform, 1);
-  
+  glUniform1i(colorUniform, 1);  
   
   glGenTextures(1, &depthTexture);
   glBindTexture(GL_TEXTURE_2D, depthTexture);
   glBindTexture(GL_TEXTURE_2D, colorTexture);
   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+  
+  glEnable(GL_POINT_SPRITE);
+  glEnable(GL_VERTEX_PROGRAM_POINT_SIZE);
 }
 
 - (void) setDepthSamples: (NSData *)data {