Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenGL.GL.shaders.ShaderCompilationError #6

Open
imliubo opened this issue Jun 21, 2020 · 2 comments
Open

OpenGL.GL.shaders.ShaderCompilationError #6

imliubo opened this issue Jun 21, 2020 · 2 comments

Comments

@imliubo
Copy link

imliubo commented Jun 21, 2020

Hi,
Your video tutorial is great!When I run the code,I got this error,how to fix it ?

Traceback (most recent call last):
  File "ep11_view_matrix.py", line 113, in <module>
    shader = compileProgram(compileShader(vertex_src, GL_VERTEX_SHADER), compileShader(fragment_src, GL_FRAGMENT_SHADER))
  File "/usr/local/lib/python3.5/dist-packages/OpenGL/GL/shaders.py", line 241, in compileShader
    shaderType,
OpenGL.GL.shaders.ShaderCompilationError: ("Shader compile failure (0): b'0:2(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'", [b'\n# version 330\n\nlayout(location = 0) in vec3 a_position;\nlayout(location = 1) in vec2 a_texture;\n\nuniform mat4 model;\nuniform mat4 projection;\nuniform mat4 view;\n\nout vec3 v_color;\nout vec2 v_texture;\n\nvoid main()\n{\n    gl_Position = projection * view * model * vec4(a_position, 1.0);\n    v_texture = a_texture;\n}\n'], GL_VERTEX_SHADER)
@Helder-Tomas
Copy link

Hi,
Do the other examples work for you?
If not, then your machine does not have a high enough version of OpenGL. Try updating the drivers, or running on another machine.

I get the same error If I try to run on a Virtual Machine that only supports OpenGL 1.1

@1fth3n3ls3
Copy link

1fth3n3ls3 commented Aug 19, 2020

I get the very same error message, from a mac but I check and OpengGL last version supported version is 3.3 and it works using glfw with a c++ implementation so not sure why is failing in pyopengl.
Edit:
I was able to overcome this error with the solution propose here https://stackoverflow.com/questions/52915196/pyopengl-opengl-version-on-macos
but unfortunately, other errors were raised after this in check_validate method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants