Commits

Cliff Biffle committed 66e86eb

Sets a default raw depth field of uninitialized memory.

Comments (0)

Files changed (3)

English.lproj/MainMenu.xib

 					</object>
 					<int key="connectionID">532</int>
 				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">depthView</string>
+						<reference key="source" ref="976324537"/>
+						<reference key="destination" ref="706664223"/>
+					</object>
+					<int key="connectionID">534</int>
+				</object>
 			</object>
 			<object class="IBMutableOrderedSet" key="objectRecords">
 				<object class="NSArray" key="orderedObjects">
 				</object>
 			</object>
 			<nil key="sourceID"/>
-			<int key="maxID">533</int>
+			<int key="maxID">534</int>
 		</object>
 		<object class="IBClassDescriber" key="IBDocument.Classes">
 			<object class="NSMutableArray" key="referencedPartialClassDescriptions">
 					<string key="className">KinectViewerAppDelegate</string>
 					<string key="superclassName">NSObject</string>
 					<object class="NSMutableDictionary" key="outlets">
-						<string key="NS.key.0">window</string>
-						<string key="NS.object.0">NSWindow</string>
+						<bool key="EncodedWithXMLCoder">YES</bool>
+						<object class="NSArray" key="dict.sortedKeys">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>depthView</string>
+							<string>window</string>
+						</object>
+						<object class="NSMutableArray" key="dict.values">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>KVDepthView</string>
+							<string>NSWindow</string>
+						</object>
 					</object>
 					<object class="NSMutableDictionary" key="toOneOutletInfosByName">
-						<string key="NS.key.0">window</string>
-						<object class="IBToOneOutletInfo" key="NS.object.0">
-							<string key="name">window</string>
-							<string key="candidateClassName">NSWindow</string>
+						<bool key="EncodedWithXMLCoder">YES</bool>
+						<object class="NSArray" key="dict.sortedKeys">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>depthView</string>
+							<string>window</string>
+						</object>
+						<object class="NSMutableArray" key="dict.values">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<object class="IBToOneOutletInfo">
+								<string key="name">depthView</string>
+								<string key="candidateClassName">KVDepthView</string>
+							</object>
+							<object class="IBToOneOutletInfo">
+								<string key="name">window</string>
+								<string key="candidateClassName">NSWindow</string>
+							</object>
 						</object>
 					</object>
 					<object class="IBClassDescriptionSource" key="sourceIdentifier">

KinectViewerAppDelegate.h

 
 #import <Cocoa/Cocoa.h>
 
+@class KVDepthView;
+
 @interface KinectViewerAppDelegate : NSObject <NSApplicationDelegate> {
   NSWindow *window;
+  KVDepthView *depthView;
 }
 
 @property (assign) IBOutlet NSWindow *window;
+@property (assign) IBOutlet KVDepthView *depthView;
 
 @end

KinectViewerAppDelegate.m

 //
 
 #import "KinectViewerAppDelegate.h"
+#import "KVDepthView.h"
 
 @implementation KinectViewerAppDelegate
 
 @synthesize window;
+@synthesize depthView;
 
-- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
-	// Insert code here to initialize your application 
+- (void)applicationDidFinishLaunching: (NSNotification *)aNotification {
+  uint8_t *zeroes = malloc(640 * 480 * 2);
+	depthView.rawDepthField = [NSData dataWithBytes: zeroes length: 640 * 480 * 2];
 }
 
 @end