SFML community forums
Help => General => Topic started by: dydya-stepa on November 06, 2011, 12:03:46 pm
-
which versions of opengl and glsl sfml supports ?
-
This question doesn't make sense. SFML doesn't support anything, it rather depends on the target graphics card.
Some GPUs may not support shaders at all, some others may support it but with a limited set of GLSL instructions, etc...
-
ok, which opengl / shader context or whatever it creates by default?
-
It creates a "regular" context by default, but you can enable contexts >= 3.0 when you create the window, and choose a specific context version.
-
when i call Shader::IsAvailable() what it checks? if i get true - what version of shaders should i write my app against ?
-
when i call Shader::IsAvailable() what it checks?
It checks the following extensions:
ARB_shading_language_100
ARB_shader_objects
ARB_vertex_shader
ARB_fragment_shader
This is the minimum to get shaders working.
if i get true - what version of shaders should i write my app against ?
The version that the graphics card supports. I don't know how to retrieve it (I don't even know if it's possible), so there's no way to check this with SFML.
-
Using this table
GLSL Version OpenGL Version
1.10.59 2.0
1.20.8 2.1
1.30.10 3.0
1.40.08 3.1
1.50.11 3.2
3.30.6 3.3
4.00.9 4.0
4.10.6 4.1
4.20.6 4.2
You can get the current OpenGL version used with:
std::cout << "Using OpenGL " << App.GetSettings().MajorVersion << "." << App.GetSettings().MinorVersion << std::endl;
And write the shader code that is supported by the openGL version
-
thanks! that's what i needed