From 890497a56fde7a4c234d236c3c97afaaddcb1824 Mon Sep 17 00:00:00 2001 From: ultramn Date: Wed, 17 May 2017 18:51:22 -0700 Subject: Included CNFGCocoaNSImageDriver now default --- redist/CocoaDriver.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'redist') diff --git a/redist/CocoaDriver.m b/redist/CocoaDriver.m index 842d372..2181e28 100644 --- a/redist/CocoaDriver.m +++ b/redist/CocoaDriver.m @@ -456,6 +456,7 @@ void CNFGSetup( const char * WindowName, int sw, int sh ) app_window = [[[NSWindow alloc] initWithContentRect:NSMakeRect(0, 0, sw, sh) styleMask:NSTitledWindowMask backing:NSBackingStoreBuffered defer:NO] autorelease]; + app_oglView = [[[MyOpenGLView alloc] initWithFrame:NSMakeRect(0, 0, sw, sh) ] autorelease]; [app_window setContentView:app_oglView]; [app_window cascadeTopLeftFromPoint:NSMakePoint(20,20)]; @@ -467,7 +468,6 @@ void CNFGSetup( const char * WindowName, int sw, int sh ) oglCompatibilityInit(sw*sh); // Initialize the OpenGL compatibility layer - //-------------------- // Clear the screen to black //-------------------- @@ -478,6 +478,7 @@ void CNFGSetup( const char * WindowName, int sw, int sh ) // Peek at the next event app_currDate = [[NSDate alloc] init]; + NSEvent *event = [NSApp nextEventMatchingMask:NSAnyEventMask @@ -485,7 +486,7 @@ void CNFGSetup( const char * WindowName, int sw, int sh ) inMode:NSEventTrackingRunLoopMode dequeue:YES]; [app_currDate release]; - + [NSApp updateWindows]; glClearColor(0.0,0.0,0.0,0.0); @@ -493,7 +494,6 @@ void CNFGSetup( const char * WindowName, int sw, int sh ) [app_oglContext flushBuffer]; - // Set up a 2D projection //oglMatrixMode(OGL_PROJECTION); // Select The Projection Matrix //oglLoadIdentity(); // Reset The Projection Matrix -- cgit v1.2.3