Closed suuuehgi closed 5 years ago
bump ^
You would need to update your graphics driver to support GLSL 330 If this isn't available for your hardware, you'd have to port the shader to an older version.
Thanks for the reply! I use the current driver version with Mesa 18.3.3 that should support GLSL 330 afaics.
EDIT:
> glxinfo | grep "core profile"
Max core profile version: 4.5
OpenGL core profile version string: 4.5 (Core Profile) Mesa 18.3.3
OpenGL core profile shading language version string: 4.50
Also changing the version to #version 320 es
in pyspace/vert.glsl
and pyspace/frag.glsl
does not work.
same issue, also on archlinux.
Similar issue on a fresh install of Ubuntu 18.04
Same for me, on Arch Linux. And my Mesa version is 19.0.5 Also, i'd love to see this programm works on my computer, so, please, do something :pray:
Is this still the same error message as before?
error: GLSL 3.30 is not supported.
It could be a problem with PyOpenGL not reading the version correctly...
Is this still the same error message as before? (
error: GLSL 3.30 is not supported.
)
Yes:
> python3 ray_marcher_demo.py
pygame 1.9.4
Hello from the pygame community. https://www.pygame.org/contribute.html
Compiling Vertex Shader...
b'0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, 3.00 ES, 3.10 ES, and 3.20 ES\n'
I did some quick googling and found the same problem and a solution: https://gamedev.stackexchange.com/a/139240
Basically, pygame is built on SDL1, but there is a drop-in replacement ported to SDL2 that has support for gl_set_attribute to give a context hint with the version number before opening the window. The important lines to add are these:
import pygame_sdl2
pygame_sdl2.init()
pygame_sdl2.display.gl_set_attribute(pygame_sdl2.GL_CONTEXT_MAJOR_VERSION, 3)
pygame_sdl2.display.gl_set_attribute(pygame_sdl2.GL_CONTEXT_MINOR_VERSION, 3)
Let me know if this works for anyone.
Actually ignore my last comment.
I decided to downgrade the GLSL requirement to 1.20 so this should not cause an error anymore (I did the same thing in Marble Marcher). The fix has been pushed in. I'll consider this issue closed now, but please open a new issue if there's any new problems.
It works! Thanks a ton! (^-^)/
Any idea how to fix this?
Thanks a lot!