Jump to:

I have some trouble getting RenderStack running properly on Mac OSX 10.7.2.

First, I can't seem to be able to create OpenGL 3.2 core context.
Second, input does not seem to work.

Has anyone succeeded with 3.2 core context?
Is the current mac platform code in OpenTK even able to do it?
I see current core uses AGL and Carbon, while I am suspecting that for GL 3.2 support might require using Cocoa and NSOpenGLView.

Comments

Comment viewing options

I see that OpenTK only has PixelFormatAttributes up to 61 (kCGLPFASampleAlpha). In order to create 3.2 profile context, one would need to specify kCGLPFAOpenGLProfile -> kCGLOGLPVersion_3_2_Core. That is clearly is not supported by current Mac platform code in OpenTK :/

I sat down and decided to test the input issue more completely tonight and discovered that input does work, so long as you don't use the Keyboard.GetState() method since the HIDInput integration is broken in OpenTK on OSX 10.7. However, It processes window events just fine and at the moment, OpenTK jams the key events into the dummy devices it has inside OpenTK.Platform.MacOS.CarbonInput which are accessible inside GameWindow via InputDriver.Keyboard[0] and InputDriver.Mouse[0] (there is always 1 mouse and 1 keyboard, they're setup in the constructor of CarbonInput, so it's safe to use [0] even though normally it would be very bad).

I've moved my input routines across to using InputDriver.Keyboard and InputDriver.Mouse and it's working just fine on Windows and Mac, and will be sufficient until the problem can be resolved properly (I prefer the Keyboard.GetState() approach personally) because GameWindow.InputDriver has been marked as Obsolete.