tksuoran's picture

Mac OSX 10.7.2 support?

Project:The Open Toolkit library
Version:1.1-2014-01-02
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed
Description

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

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

#1

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 :/

Jase's picture

#2

I request an OpenGL 2.1 context during initialisation of my OpenTK app and can render just fine (http://blog.nycterent.com/macosx-compatibility) but have not tried creating an OpenGL 3.2 core context specifically.

Input, however, is a whole other matter. I posted about what I encountered here: http://www.opentk.com/node/2800 which contains details about what I discovered.

I'm really hoping someone has an answer, Mac support is high on my list of priorities.

Jase's picture

#3

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.

Hope this helps someone.

tksuoran's picture

#4

Priority:normal» critical

Creating GL 3.2 context remains not possible.

the Fiddler's picture

#5

Version:1.x-dev» 1.1-2014-01-02
Status:open» closed

It is not possible to create a 3.2 context using Carbon/AGL. Thank Apple for that. :)

OpenTK 1.1 beta1+ provides a SDL2 backend that supports OpenGL 3.2. A hypothetical Cocoa/NSOpenGL backend would also solve this if it were ever implemented.