1
Window / Mac - OpenGL higher than 2.1
« on: December 12, 2012, 03:28:52 pm »
EDIT: I just realized that I am an idiot - I forgot to call window.getSettings()... I am still only getting a 2.1 context. I have updated the below.
I am running on a brand new MBP, but it seems as though SFML will not let me select a OpenGL version higher than 2.1.
Nor will it allow me to have a non-0 depth bits, stencil bits, or antialiasing. Nevermind those work.
I am using the SFML 2.0 Release Preview (the one with the installer on the site).
Is this a limitation of the SFML mac implementation, does my computer really not support OGL 3, am I doing something silly, or should I really just be using a different version of SFML.
the code I am running is below (in main):
It outputs:
I can probably live with that (A.K.A. It has shaders), but its always nice to have access to newer features.
I am running on a brand new MBP, but it seems as though SFML will not let me select a OpenGL version higher than 2.1.
I am using the SFML 2.0 Release Preview (the one with the installer on the site).
Is this a limitation of the SFML mac implementation, does my computer really not support OGL 3, am I doing something silly, or should I really just be using a different version of SFML.
the code I am running is below (in main):
Code: [Select]
sf::ContextSettings wSettings;
wSettings.depthBits = 24;
wSettings.stencilBits = 8;
wSettings.antialiasingLevel = 2;
wSettings.majorVersion = 3;
wSettings.minorVersion = 2;
// Create the main window
sf::Window window(sf::VideoMode(800, 600), "SFML window", sf::Style::Default, wSettings);
sf::ContextSettings actualSettings = window.getSettings();
std::cout << "depth bits:" << actualSettings.depthBits << std::endl;
std::cout << "stencil bits:" << actualSettings.stencilBits << std::endl;
std::cout << "antialiasing level:" << actualSettings.antialiasingLevel << std::endl;
std::cout << "version:" << actualSettings.majorVersion << "." << actualSettings.minorVersion << std::endl;
It outputs:
Code: [Select]
depth bits:24
stencil bits:8
antialiasing level:2
version:2.1
I can probably live with that (A.K.A. It has shaders), but its always nice to have access to newer features.