nehe tutorials - fullscreen
when trying any of the nehe cocoa tutorials, I can build and run, however when trying fullscreen mode I get the message "Failed to initialize OpenGL" and crash.
Any ideas or suggestions?
I'm using Xcode 1.5, Panther, on G4 AlBook 1Ghz (64mb vram)
Michael
Any ideas or suggestions?
I'm using Xcode 1.5, Panther, on G4 AlBook 1Ghz (64mb vram)
Michael
All the Cocoa NeHe code I've run across is broken for switching into fullscreen.
Here's the fix:
Oh, I should note this is under
- (NSOpenGLPixelFormat *) createPixelFormat: (NSRect)frame
in the Lesson**View.m file.
Code:
if( runningFullScreen ) // Do this before getting the pixel format
{
// ****add these two lines to fix fullscreen bug
pixelAttribs[pixNum++] = NSOpenGLPFAScreenMask;
pixelAttribs[pixNum++] = CGDisplayIDToOpenGLDisplayMask( kCGDirectMainDisplay );
pixelAttribs[ pixNum++ ] = NSOpenGLPFAFullScreen;
fullScreenMode = (NSDictionary *) CGDisplayBestModeForParameters(
kCGDirectMainDisplay,
colorBits, frame.size.width,
frame.size.height, NULL );
CGDisplayCapture( kCGDirectMainDisplay );
CGDisplayHideCursor( kCGDirectMainDisplay );
CGDisplaySwitchToMode( kCGDirectMainDisplay,
(CFDictionaryRef) fullScreenMode );
}- (NSOpenGLPixelFormat *) createPixelFormat: (NSRect)frame
in the Lesson**View.m file.
How funny! That sure looks an aweful lot like *my* fix. Well at least I beat you to it this time.
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Errors With NeHe OpenGL Guide | SamGray | 1 | 2,283 |
Sep 6, 2009 02:36 PM Last Post: AnotherJake |
|
| NeHe revival? | Duane | 20 | 7,435 |
Jul 11, 2007 09:57 AM Last Post: AnotherJake |
|
| NeHe example | djohnson | 4 | 2,781 |
Jan 30, 2004 01:58 PM Last Post: Sohta |
|
| NeHe and OpenGL Inconsistencies | Justin Brimm | 4 | 3,179 |
Jul 11, 2003 08:18 AM Last Post: Feanor |
|

