|
MacOS X / Allegro 5.2.3 incorrect OpenGL version |
calteran
Member #16,790
January 2018
|
TL;DR: I'm not getting the correct OpenGL version from Allegro. On my iMac, using an OpenGL profile viewer, I have the following specs: 1<System>Mac OS X 10.13.4 (17E139j)</System>
2<Device>iMac16,2</Device>
3<CPU>2.8 GHz Intel(R) Core(TM) i5-5575R CPU @ 2.80GHz x 4</CPU>
4<Vendor>Intel Inc.</Vendor>
5<Version>4.1 INTEL-10.32.28</Version>
6<GLSLVersion>4.10</GLSLVersion>
7<Renderer>Intel(R) Iris(TM) Pro Graphics 6200</Renderer>
Relevant code: 2 al_set_new_display_flags(ALLEGRO_FULLSCREEN_WINDOW | ALLEGRO_OPENGL | ALLEGRO_OPENGL_3_0);
3 al_set_new_display_option(ALLEGRO_SAMPLE_BUFFERS, 1, ALLEGRO_SUGGEST);
4 al_set_new_display_option(ALLEGRO_SAMPLES, 4, ALLEGRO_SUGGEST);
5 al_set_new_display_option(ALLEGRO_OPENGL_MAJOR_VERSION, 4, ALLEGRO_REQUIRE);
6 al_set_new_display_option(ALLEGRO_OPENGL_MINOR_VERSION, 1, ALLEGRO_REQUIRE);
7 al_set_new_display_refresh_rate(60);
8
9 display = al_create_display(screen_width, screen_height);
10 if(!display) {
11 std::cerr << "failed to create display!" << std::endl;
12 return -1;
13 }
14
15 std::cout << "OpenGL version: " << glGetString(GL_VERSION) << std::endl;
I'm only getting version "2.1 INTEL-10.32.28" instead of 3.0 or 4.1 (either of which would seem correct to me). I've experimented with both the ALLGRO_FULLSCREEN and ALLEGRO_FULLSCREEN_WINDOW flags as well as including ALLEGRO_OPENGL_FORWARD_COMPATIBLE, neither of which has affected the version of my context. Any ideas? |
SiegeLord
Member #7,827
October 2006
|
Bad news: those flags and settings are ignored, you'll always get OpenGL 2.1. "For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18 |
calteran
Member #16,790
January 2018
|
SiegeLord said: Bad news: those flags and settings are ignored, you'll always get OpenGL 2.1. Is that documented anywhere? I was under the impression that a display/context wouldn't be created at all if an ALLEGRO_REQUIRE condition failed. In all honesty, you shouldn't put any special effort into updating the library for me, but I appreciate your willingness to. |
|