Re: [PyOpenGL-Users] Difficulty with the shaders tutorial
Brought to you by:
mcfletch
From: Ian M. <geo...@gm...> - 2012-02-16 19:15:18
|
On Thu, Feb 16, 2012 at 12:09 PM, Derakon <de...@gm...> wrote: > On further investigation, those functions weren't available because I > didn't have an OpenGL context yet. My bad. Moving the set-up to later > on in the program (the first paint call) instead gives these errors: > > RuntimeError: ('Shader compile failure (0): 0(3) : error C7533: global > variable gl_ModelViewProjectionMatrix is deprecated after version > 120\n0(3) : error C7533: global variable gl_Vertex is deprecated after > version 120\n', ['#version 330\n void main() {\n > gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;\n > }'], GL_VERTEX_SHADER) > > Feel free to correct me, but it looks like this means that the > tutorial is using deprecated concepts? GL_VERSION is 3.3.0 and > GL_SHADER_VERSION is "3.30 NVIDIA via Cg compiler", for what it's > worth. In later versions of OpenGL, the hardware matrix support was dropped. I think this is a mistake. But the practical upshot is, to make your code work, try using something like "#version 120" or something. Ian |