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

Author Topic: SFML Core Profile is not compiling GLSL 330  (Read 2157 times)

0 Members and 1 Guest are viewing this topic.

Alpha-Phoenix

  • Newbie
  • *
  • Posts: 1
    • View Profile
    • Email
SFML Core Profile is not compiling GLSL 330
« on: August 01, 2017, 11:22:53 pm »
Hello Everyone! I'm trying to use GLSL 330 core with SFML but I don't know what's going on!
Here is my code:

(click to show/hide)

(click to show/hide)

(click to show/hide)

Output:
SFML Using OpenGL: 3.3
OpenGL Version: 3.0 Mesa 17.0.7
GLSL Version: 1.30
Failed to compile vertex shader:
0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES

ERROR: Failed to load shader

GLX:
glxinfo | grep OpenGL
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) Ivybridge Mobile
OpenGL core profile version string: 3.3 (Core Profile) Mesa 17.0.7
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 17.0.7
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.0 Mesa 17.0.7
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00
OpenGL ES profile extensions:
 

Por que o SFML produz GLSL versão 1.30 e GLX 3.30?
Please help me!!!  :'(

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1405
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
Re: SFML Core Profile is not compiling GLSL 330
« Reply #1 on: August 02, 2017, 12:59:01 am »
If you really want to use OpenGL 3.3 core on your system some steps are necessary:
  • Don't use anything in sfml-graphics, this includes sf::Shader. sfml-graphics contexts are by default always compatibility. You will have to do everything yourself in raw OpenGL.
  • On your system you have to make sure that you are not using any compatibility contexts. This means no sfml-graphics and explicitly having to activate the context of your window after creation.
  • Always make sure that your window is activated after you create it. If you don't explicitly do this you might end up using a context you didn't create, which is not going to be 3.3 core.
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).