I also added a FrameBufferObject implementation to the "special effects" tutorial path for OpenGLContext. This uses the convenience wrapper for frame buffer objects which I just added to PyOpenGL. The convenience wrapper just makes the ARB and EXT variants of the entry points available via alternates and provides a checkFramebufferStatus function which implements the ARB extensions suggested check operation (with a raised GLError if there's a problem). That should all show up on the next release, as it will need the newest PyOpenGL release.
At the moment I'm still not very satisfied with the results. Even with a 2048x2048 depth texture I'm seeing very obvious pixellation in the shadows. I'm guessing either floating-point-precision issues or problems with the setup of the scene (OpenGLContext is very conservative with clipping planes, so there's a lot of depth-buffer "compression" going on as the depth buffer goes way off into the distance). I looked into doing multisampling on the depth texture, but that seems to require doing a pixel copy into the texture, which somewhat obviates the value of the direct-to-texture (off-screen) rendering approach.
I also found and fixed a large set of errors in the auto-generated extension wrappers. I also tweaked the docstrings generated. The errors found were that the glGet* constants were not getting registered because the OpenGL extension registry has moved (duh!). I'm thinking I need to spend some quality time with at least the extensions on my machine and make sure that we've got all image-formats, array retrieval, etceteras properly noted and wrapped. Not this week, though.
Pingbacks are closed.