0

I've installed PyOpenGL for my Ubuntu PC, & I used it with Pygame withot any problems, but now I've experimented a bit with Sharders.

I used the sharder loading code from the Pygame CookBook, with the simplest possible vertex sharders for #version 330 core.

It gave me this message: error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES

I've tried to use #version 300, but it gave me the same resout(except fot that it said that 3.00 is not supported)

My GPU SUPPORTS GLSL 330. I know I tested it in C.

What should I do to get in work with new versions?

EDIT

glGetString(GL_VERSION) returns 3.0 Mesa 11.0.2.

Uncle Dino
  • 812
  • 1
  • 7
  • 23
  • 2
    Your GPU supporting GL3.3 does not imply the OpenGL _context_ you are using to also support it. As per the spec, implementors are only required to implement the _core profile_ of modern GL. To me, this lokks like you try this on mesa without explicitely using a core profile, which will limit you to GL3.0/GLSL 1.30. Btw, GLSL #version 300 doesn't exist. – derhass Feb 21 '16 at 01:10
  • @derhass: Yes, `#version 300` does exist. It refers to GLSL **ES** 3.00. I have no idea what OpenGL ES will do when they hit 3.3 ;) – Nicol Bolas Feb 21 '16 at 01:14
  • 1
    @NicolBolas: you are right, GLSL 3.00 does exist. However the respective GLSL spec states "The directive `#version 300 es` is required in any shader that uses version 3.00 of the language.", so I don't think that `#version 300` written as a GLSL preprocessor directive can be referring to the ES version, and is just invalid. The handling of `#version 100` to refer to GLES2's shading languageis just an inconsistency which they never should have come up with. – derhass Feb 21 '16 at 01:30
  • BTW, It says it's supported, that's why I tried it. You can see that It prints the same error if I try to set to `#version 330 core`. – Uncle Dino Feb 21 '16 at 11:07
  • @derhass I'm new in OpenGL-context thingie, but It looks like to me that you're right. How can I fix this with PyOpenGL? – Uncle Dino Feb 21 '16 at 11:09
  • @Sasszem: Well, PyOpenGL is the part I've no clue about. – derhass Feb 21 '16 at 13:18

0 Answers0