Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
Graphics
»
Forcing a certain GLSL specification
Print
Pages: [
1
]
Author
Topic: Forcing a certain GLSL specification (Read 1863 times)
0 Members and 1 Guest are viewing this topic.
pdinklag
Sr. Member
Posts: 330
JSFML Developer
Forcing a certain GLSL specification
«
on:
January 31, 2012, 09:08:09 pm »
Is it possible to somehow tell the GPU to compile GLSL programs following a certain specification? Let's say my GPU supports the latest GLSL, but I want to make sure my shader program is compatible to GLSL 1.10 (OpenGL 2.0) to avoid problems like this one:
http://www.sfml-dev.org/forum/viewtopic.php?t=6930
.
If so, I believe the sf::Shader class (or, depending on how it'd work, the sf::ContextSettings class) should support that feature. I can tell for sure that setting the OpenGL major and minor versions in the context settings does not influence the GLSL specification used for compiling.
Logged
JSFML
- The Java binding to SFML.
Laurent
Administrator
Hero Member
Posts: 32498
Forcing a certain GLSL specification
«
Reply #1 on:
January 31, 2012, 10:59:45 pm »
I've never heard about such a feature, I don't know if it's possible.
Logged
Laurent Gomila - SFML developer
Lynix
Sr. Member
Posts: 403
Forcing a certain GLSL specification
«
Reply #2 on:
February 01, 2012, 12:03:55 am »
"#version 110" ?
Logged
pdinklag
Sr. Member
Posts: 330
JSFML Developer
Forcing a certain GLSL specification
«
Reply #3 on:
February 01, 2012, 07:41:10 am »
That is, a comment in the first line of the shader itself? I believe I had read about such a feature once, thanks for reminding.
EDIT: Yes, that's it! Thanks!
Logged
JSFML
- The Java binding to SFML.
Print
Pages: [
1
]
SFML community forums
»
Help
»
Graphics
»
Forcing a certain GLSL specification