[Mono-osx] [MonoMac] GLFullScreen sample

Miguel de Icaza miguel at novell.com
Sat Mar 5 14:59:51 EST 2011

Hello Kenneth,

> This sample code demonstrates OpenGL drawing to the entire screen.

Another fabulous sample.   I have added it to GitHub.

This sample reminded me that we need a better overload for the
creating the NSOpenGLPixelFormatAttribute.   If this is not a common
enough use (something that would not be in the middle of a render
loop), perhaps the NSOpenGLPixelFormat could take a better system,
similar to what we do in CoreText to create the list of attributes to
avoid casting integers into enum values.

We also need to expose a safe method for the call:
	// Synchronize buffer swaps with vertical refresh rate
			int[] swapInt = new int[] { 1 };
			unsafe {
				fixed (int* swapInt_ptr = &swapInt[0]) {
					openGLContext.SetValues ((IntPtr)swapInt_ptr,

Also, on this sample, your editor replaced tabs with spaces, which
breaks MonoDevelop's heuristics to render the file properly.   Did you
recently change editors?


More information about the Mono-osx mailing list