Commits

Cliff Biffle committed e529285

Added an (unused) binding for a color texture on unit 1.

  • Participants
  • Parent commits 9c3d015
  • Branches shaders

Comments (0)

Files changed (3)

   
   GLint depthUniform = glGetUniformLocation(program, "depthTex");
   glUniform1i(depthUniform, 0);
-  
+
+  GLint colorUniform = glGetUniformLocation(program, "colorTex");
+  glUniform1i(colorUniform, 1);
+
   [self resetCamera];
   [renderer initGL];
 }
 - (void) drawInCurrentOpenGLContextWithOptions: (NSDictionary *) options {
   NSTimeInterval start = [NSDate timeIntervalSinceReferenceDate];
 
+  glActiveTexture(GL_TEXTURE0);
   glBindTexture(GL_TEXTURE_2D, depthTexture);
   glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE16, 640, 480, 0, GL_LUMINANCE, GL_UNSIGNED_SHORT, &depthImage);
   
  */
  
 uniform sampler2D depthTex;
+uniform sampler2D colorTex;
 
 /*
  * Vertex Shader entry point.