emacinnes's picture

Linux/MacOSX running OpenTK

Project:The Open Toolkit library
Category:bug report

I'm getting to the bottom of the MacOSX issue on VMWare. It also occurs on Linux (Fedora F10) also through VMWare, the basic problem is that here a 32 bit depth buffer isn't available, only 16 bit, and no AA samples. so the Default values aren't going to make it work here. There are other issues, by hardcoding the display type though I can at least get past this bit.


Icarus Scene Engine. OpenTK-based 3D simulation & games solution:

See Icarus videos on YouTube at:


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
the Fiddler's picture


That's strange. The default mode requests a 16bit depth buffer and no AA precisely because for compatibility reasons. From Source/OpenTK/Graphics/GraphicsMode.cs

        public static GraphicsMode Default
                lock (SyncRoot)
                    if (defaultMode == null)
                        Debug.Print("Creating default GraphicsMode ({0}, {1}, {2}, {3}, {4}, {5}, {6}).", DisplayDevice.Default.BitsPerPixel,
                                    16, 0, 0, 0, 2, false);
                        defaultMode = new GraphicsMode(DisplayDevice.Default.BitsPerPixel, 16, 0, 0, 0, 2, false);
                    return defaultMode;

Edit: aha, it seems that MacOSGraphicsMode hardcodes the mode with id 1 no matter what you request.

        public GraphicsMode SelectGraphicsMode(ColorFormat color, int depth, int stencil, int samples, ColorFormat accum, int buffers, bool stereo)
            GraphicsMode gfx = new GraphicsMode((IntPtr)1, color, depth, stencil, samples,
                                                 accum, buffers, stereo);
            System.Diagnostics.Debug.Print("Created dummy graphics mode.");
            return gfx;

This needs to be fixed.

However, this doesn't explain why X11GraphicsMode selects an incompatible mode. (The driver shouldn't do that, in theory).

the Fiddler's picture


Status:open» closed

The Mac issue (#1679: GraphicsMode returns hardcoded mode on Mac OS X) is now fixed.

I cannot reproduce the Linux issue on VirtualBox but please reopen if it still occurs.