Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Any way to get AGL_FULLSCREEN to work on a tiBook 800?



Hmmm, the simple answer would be that AGL_FULLSREEN is spelled wrong.
Assuming that is a typing issue and not one in the code... This pixel
format/code works on my 800Mhz PB:

(you could be trying to does full screen without specify the display)

AGLContext SetupAGLFullScreen (GDHandle display, short * pDepth,
short * pWidth, short * pHeight)
{
GLint attrib[64];
AGLPixelFormat fmt;
AGLContext ctx;

short i = 0;
attrib [i++] = AGL_RGBA; // red green blue and alpha
attrib [i++] = AGL_DOUBLEBUFFER; // double buffered
attrib [i++] = AGL_FULLSCREEN;
attrib [i++] = AGL_PIXEL_SIZE;
attrib [i++] = *pDepth;
attrib [i++] = AGL_DEPTH_SIZE;
attrib [i++] = 32;
attrib [i++] = AGL_NONE;

fmt = aglChoosePixelFormat(&display, 1, attrib); // this may fail if
looking for accelerated across multiple monitors
if (NULL == fmt) {
// optional error reporting
// ReportError("Could not find valid pixel format");
// aglDebugStr ();
return NULL;
}

ctx = aglCreateContext (fmt, NULL); // Create an AGL context
aglDestroyPixelFormat(fmt); // pixel format is no longer needed
if (NULL == ctx) {
// optional error reporting
// ReportError ("Could not create context");
// aglDebugStr ();
return NULL;
}

#ifdef kDebug
aglEnable (ctx, AGL_FS_CAPTURE_SINGLE);
#endif

if (!aglSetFullScreen (ctx, *pWidth, *pHeight, 0, 0)) {
// optional error reporting
// ReportError ("SetFullScreen failed");
// aglDebugStr ();
return NULL;
}

if (!aglSetCurrentContext (ctx)) { // make the context the current context
// optional error reporting
// ReportError ("SetCurrentContext failed");
// aglDebugStr ();
aglSetDrawable (ctx, NULL); // turn off full screen
return NULL;
}

return ctx;
}

>OS X (10.1.5 and 10.2.2):
>
>Some full screen code that works happily on a 400 Mhz G4 tower with
>AGP 2x Mac Edition Radeon (a 3rd party board) refuses to work on a
>800 Mhz G4 tiBook (mobility radeon).
>
>after:
>
>fmt = aglChoosePixelFormat(NULL, 0, attrib);
>
>where attrib =
> {AGL_RGBA,
> AGL_DOUBLEBUFER,
> AGL_FULLSREEN,
> AGL_DEPTH_SIZE, 32,
> AGL_NONE}
>
>I get and AGL error: AGL Error 10006: invalid display pixel format
>
>I tried some of the obvious things such as different versions of OS
>X, screen depths, sizes, ...
>
>I am trying to follow the AGL_FULLSCREEN discussion. Seems that
>things are pretty complex here. Is there anything specific about 800
>Mhz tiBooks? If so, are there any workarounds for Carbon programming
>without the need for sprockets etc? I am really puzzled by the fact
>that full screen worked right away of a 3rd party video board but
>not on off the shelve machine.
>
>any pointers appreciated

--
Geoff Stahl
OpenGL Engineer
Apple
_______________________________________________
mac-opengl mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/mac-opengl
Do not post admin requests to the list. They will be ignored.

References: 
 >Any way to get AGL_FULLSCREEN to work on a tiBook 800? (From: Alexander Repenning <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.