Source

kinect-viewer / KVRenderer.m

Diff from to

File KVRenderer.m

 #import "KVRenderer.h"
 #import "utility.h"
 
+const NSString * const KVSurfaceMode = @"KVSurfaceMode";
+const NSString * const KVPlainSurfaceMode = @"KVPlainSurfaceMode";
+const NSString * const KVTexturedSurfaceMode = @"KVTexturedSurfaceMode";
+
 @interface KVRenderer ()
 - (void) buildPointField;
 - (GLuint) loadShaderOfType: (GLenum) type fromFiles: (NSArray *) names;
 }
 
 - (void) drawInCurrentOpenGLContextWithOptions: (NSDictionary *) options {
-  BOOL textureFromCamera = NO;  // TODO read from options
+  BOOL textureFromCamera = [[options objectForKey: KVSurfaceMode] boolValue];
   
   NSTimeInterval start = [NSDate timeIntervalSinceReferenceDate];