Re: [PyOpenGL-Users] How to use shaders in pyopengl
Brought to you by:
mcfletch
From: Dirk R. <di...@li...> - 2008-08-28 14:35:50
|
Hi Mike, thanks for the quick response! Mike C. Fletcher wrote: > > vrml97.arrays is part of PyVRML97... assuming it's installed... > > easy_install pyvrml97 > > should have happened when you did > > easy_install OpenGLContext > > However... I'm trying to set it to be easy for a Windows user, and I didn't use easy_install, I just ran setup.py from the OpenGL Context. Let me try that one. This is what I get: D:\CMPS415_Stuff\Python25\Scripts>easy_install.exe OpenGLContext Searching for OpenGLContext Best match: OpenGLContext 2.1.0a2 Adding OpenGLContext 2.1.0a2 to easy-install.pth file Installing vrml_view-script.pyw script to D:\CMPS415_Stuff\Python25\Scripts Installing vrml_view.exe script to D:\CMPS415_Stuff\Python25\Scripts Installing choosecontext-script.pyw script to D:\CMPS415_Stuff\Python25\Scripts Installing choosecontext.exe script to D:\CMPS415_Stuff\Python25\Scripts Using d:\cmps415_stuff\python25\lib\site-packages Processing dependencies for OpenGLContext Searching for PyVRML97 Reading https://sourceforge.net/project/showfiles.php?group_id=19262 Reading https://sourceforge.net/project/showfiles.php?group_id=84080 Reading http://pypi.python.org/simple/PyVRML97/ Couldn't find index page for 'PyVRML97' (maybe misspelled?) Scanning index of all packages (this may take a while) Reading http://pypi.python.org/simple/ No local packages or download links found for PyVRML97 error: Could not find suitable distribution for Requirement.parse('PyVRML97') Not sure what's wrong here. > There's no need at all for OpenGLContext to use extensions. > OpenGLContext is a separate project. The reason I mentioned it is that > it has *sample* code for using shaders. Extensions are all available as > simple imports in PyOpenGL, see: > > OpenGL/tests/tests.py:552 > > for an example of using the frame buffer object extension in PyOpenGL, > for instance. Or OpenGL/arrays/vbo.py for code using vertex buffer > objects. OK, RTFM really does help. :-/ I found the extension usage docs. So I changed your shaderobjects example to run with raw GLUT. But it's not working. I do get past the glInitShaderObjectsARB etc., but when I try to call glShaderSourceARB it says it's not available. OpenGLExtensionsViewer confirms that the extension really is supported, so I'm a little confused. I attached the program, if somebody could try this on their system I'd appreciate it. Thanks Dirk |