Re: [PyOpenGL-Users] How to use shaders in pyopengl
Brought to you by:
mcfletch
From: Mike C. F. <mcf...@vr...> - 2008-11-09 17:28:28
|
Don Laursen wrote: > I'm having a similar problem with shaders in Windows. > ... > Do I need to do something first to make the extensions available to > use? To see which extensions are available, I added the following line > to my program just before the glCreateProgram call: > > print "\n".join(glGetString(GL_EXTENSIONS).split(' ')) > > And this is what it says: > > GL_WIN_swap_hint > GL_EXT_bgra > GL_EXT_paletted_texture > This is why PyOpenGL is considering the functions unavailable. If you have access to GL_ARB_* then it should show up in that list. It's possible, I suppose, that you've got two different OpenGL implementations and PyOpenGL is picking up the software version? Can you print out the GL_VENDOR and GL_VERSION string as well? That should tell us which driver you're using. IIRC under Win32 that should be showing "nVidia something" (or "ATI something") if you've got the accelerated driver loaded, but Microsoft if you've got the default software renderer (without extensions). If that's the problem, then we'll need to look into whether there's some Win32 mechanism to select the vendor driver on-the-fly for this kind of stuff. Not being a Windows user I don't have much familiarity there, but I'll try to work through it with you. > Do I need to use glewpy or something to get access to the shader > extensions in Windows? I've confirmed that OpenGL shader extensions > work on this computer with OpenGL Extensions Viewer. I've also tried > the release version of PyOpenGL 3.0.0b6 as well as the CVS head > version (but not the bzr version). I'm stumped... The OpenGL red book > states that "OpenGL 1.2 introduces the first ARB-approved extensions." > Is that relevant, considering OpenGL is 1.1 in Windows? > CVS head is getting a bit long in the tooth, but this seems more like a platform/configuration issue. > I've attached my program. The OpenGL code is in fft/map/viewer.py. Any > help would be appreciated. > I'll try to get some time to test this on my old Win2K box today. Take care, Mike -- ________________________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com |