I like the idea of giving more power to the user -- since these classes are pretty much invisible to the user at the moment, we can go wild changing them. I'm also not a huge fan of my createOffscreenImage fix -- it's useful as a temporary workaround but ideally we should have something a bit cleaner, maybe something that ties in with changes we'd like to make to FBO/PBuffer stuff.
For my game, I made my own FBO implementation that doesn't depend on Graphics -- which makes it more useful for people like me (who do custom "low-level" rendering instead of relying on Graphics). It would also be useful as a standalone utility for Slick-Util users. We could write something similar for PBuffer/PBufferUnique, then implement these using Graphics with, say, an OffscreenGraphics class (which decides whether to use FBO/PBuffer/PBufferUnique).
FBO.javaTextureUtils.javaSome things my FBO does differently:
- Doesn't depend on enabling/disabling Graphics; instead uses the more OpenGL-like bind()/unbind() convention
- Doesn't use SlickCallable -- meaning bind/unbind is a bit faster
- Doesn't push ALL client attributes each bind; and allows advanced user to specify which attributes to push (or none at all)
- Allows for NPOT texture size; useful for making full-screen FBOs that need a particular clamp to display borders (i.e. clamp to edge)