kvark's picture

Fail to create Core OpenGL profile context (3.2) on Mac OS 10.7 (Lion)

Project:The Open Toolkit library
Version:1.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:open
Description

I'm specifying OpenGL version 3.2 when creating a context (with GLWidget), but as a result I'm given 2.1 context (GLSL version 120 only and no VAO).

At the same time OpenGL extension viewer allows switching between profiles. On Compatibility it shows 2.1, while on Core it shows 3.2 version.


Comments

Comment viewing options

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

#1

I've created a small patch that should make Core Profile work under OSX Lion.
I'm going to test it in a couple of days and report the result.

EDIT-1.
It looks like we need to move from AGL to CGL in order to create a core 3.2 profile under OSX.
As Fiddler doesn't have this platform at home, I'll try to implement this chunk of functionality on my own.
Will keep you informed on this thread about updates.

kvark's picture

#2

As it's quite a lot of work here - I would benefit from the source control. Fiddler, maybe I should branch off and keep my changes in SVN? Could you give me the write access?

kvark's picture

#3

Ok, I've got basic Cgl context management working, sharing some code with Agl implementation via newly created common class.
Now I've stack with the fact most of my shaders using "#version 130" (as a minimum required version for them to work). Apparently Lion's OpenGL 3.2 Core Context doesn't like this version and strongly demands "#version 150 core". So I'll be able to advance only after fixing all the shaders.

Anyway, The Fiddler, do you have an idea of how to proceed in the most effective way? I can provide a (big) patch or commit to SVN directly (if you grant me the access) without breaking anything. Waiting for your word here...

Ollhax's picture

#5

Did these fixes ever reach the SVN? I'm interested too in a fix for this problem, a bit more than a year later :)

Ollhax's picture

#6

I've made a basic attempt at cocoa bindings for OpenTK. Pretty rough, but perhaps enough to help someone: https://github.com/Ollhax/opentk.git

Read the commit text if you want details on my implementation, what's missing (= most of it :)) and so on.