Re: [PyOpenGL-Users] How to use shaders in pyopengl
Brought to you by:
mcfletch
From: Mike C. F. <mcf...@vr...> - 2008-08-25 03:44:12
|
Nicolas Brown wrote: > Are there any examples on how to use shaders in pyopengl that actually > work, the test in pyopenglcontext doesnt work. > I get an error; > NullFunctionError: Attempt to call an undefined function > glShaderSourceARB, check for bool(glShaderSourceARB) before calling > glShaderSource doesnt work either, i get the same error.I need an > example cuz i am tired of trying to find answers and not getting any. Are you certain that your current context supports shaders? You can see by running the following from the OpenGLContext/tests directory: python glget.py | grep program There are basically two possibilities, either your context doesn't support glShaderSource, or there's something wrong with PyOpenGL's handling of extensions on your platform (possibly Windows?) I don't use Windows or OSX, so I rely on other people to report errors over there. As for a context that doesn't support the extensions, you'll see that if e.g. you have older hardware, or your drivers are very old (e.g. a stock install of Win2K) or for some reason your machine is running in software-mode rendering. The shaderobject.py test just ran on my (Linux) workstation here, so the code should be reasonably close to working. Good luck, Mike -- ________________________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com |