[Mono-osx] [MonoMac] GLFullScreen sample

Miguel de Icaza miguel at novell.com
Sat Mar 5 22:09:04 EST 2011


Hello,

> 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.

Fixed.   Now we have a nice overload that takes object [] instead, and
you can pass the enum values, mixed with the parameter values.

The samples have been updated accordingly.

> 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,
> NSOpenGLContextParameter.SwapInterval);
>                                }
>                        }

Also did this, now it is openGLContext.SwapInterval a boolean property.

Miguel


More information about the Mono-osx mailing list