Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Mac - OpenGL higher than 2.1  (Read 1867 times)

0 Members and 1 Guest are viewing this topic.

Mystor

  • Newbie
  • *
  • Posts: 4
    • View Profile
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):
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.
« Last Edit: December 12, 2012, 03:36:48 pm by Mystor »

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: Mac - OpenGL higher than 2.1
« Reply #1 on: December 14, 2012, 05:40:13 pm »
This is a limitation of SFML. See corresponding task here : https://github.com/SFML/SFML/issues/84
SFML / OS X developer