Allegro.cc - Online Community

Allegro.cc Forums » Allegro Development » OSX OpenGL Core vs Compatability Versions

This thread is locked; no one can reply to it. rss feed Print
OSX OpenGL Core vs Compatability Versions
thebignic
Member #14,419
July 2012

Curious why I can't seem to get anything other than an OpenGL 2.1 context on OSX?

OpenGL Driver Monitor shows v2.1 for "compatability" and 4.1 for "core" ...

Tried creating display with various combinations of {ALLEGRO_OPENGL_3_0 | ALLEGRO_OPENGL | ALLEGRO_OPENGL_FORWARD_COMPATIBLE} but none of them change the version I seem to get. (performance just lags horribly with forward compatible or 3_0)

From glGetString(GL_VERSION): 2.1 (GLSL v1.20)
al_get_opengl_version(): 33619968 (v3.3? confused since docs seem indicate 3.3 would be 0x0303...?)

I now see a locked thread from a few weeks ago that mentions the major/minor flags for al_set_new_display_options appear to be broken... is there any other way to specify which version I want?

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

The problem with setting the major and minor version of OpenGL was broken on Windows, yes, but I don't know what the problem is on OSX, and I don't have access to a Mac so I can't test this.

You should try setting the major and minor version of OpenGL on OSX. It may not be broken.

33619968 in Hexadecimal is 02 01 00 00. That indicates version 2.1 .

thebignic
Member #14,419
July 2012

derp ok the hex makes sense now.

Setting major/minor doesn't seem to change anything - when I al_get_new_display_option() for them, it indicates whatever versions were set, but doesnt seem to have achieved anything regardless of what I set them to.

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

al_get_new_display_option won't tell you anything except what you set. That said, post the example code you are using. I seem to vaguely remember something about OpenGL being limited to version 2 on OSX but I don't really know. I can help you again in a few hours going out to dinner now...
Try the liballeg docs for the latest info. http://liballeg.org my my my never tried swiping before that's neat

EDIT
Try al_get_display_option after creating your display and see what it says.

SiegeLord
Member #7,827
October 2006
avatar

It's not implemented on OSX. I tried implementing it, but failed.

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

thebignic
Member #14,419
July 2012

al_get_display_option() isnt implemented, or openGL > 2.1 ?

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

thebignic
Member #14,419
July 2012

Fair enough.

Luckily, I was able to get the shaders working in GLSL 120.

Thanks for your help and contributions to Allegro nonetheless :)

Go to: