You know, after looking at the demos and seeing the amount of code that floats around these forums, I got to thinking.
There are only so many ways to make a fullscreen window. There are only so many ways to handle the problem where AWT and OpenGL have opposite direction Y values. Everybody could use a feature to extract the current buffer to a java.awt.Image file for saving as a screenshot. The dynamic lib loader discussed on another thread is another great example. It’s obvious people have written these kinds of things. And while JOGL is intended as a straight binding, it seems to me that there is no reason everybody should have to implement these basic functions of a game window.
I’m sure people will reply and say, there’s LWJGL and all of those things, and they’d be absolutely right. But, those are large, overarching frameworks for a certain kind of task; game development and so forth. What I’m wondering is if Ken and the JOGL gang could accept submissions on this forum for just incredibly useful, GENERAL PURPOSE functionality that can be seen as needed in 75% or more of JOGL apps. Take the best ones, focusing on the relationship between AWT/Swing and JOGL, and create a few additional classes for the utils package… Perhaps a subclass of JFrame that incorporates a GLCanvas or GLJpanel and includes such user methods as toFullScreen(), scaleToFitFrame2D(), and getBackBufferAsImage()? How about a GLImage class that wraps the byte buffers we use to render 2D graphics? Again, we’re not looking for “HalfYourProject.class”… Just some basic, everybody-needs-it functionality.
Doing it this way, asking for tested, proven submissions from the forum, is also a benefit because you get the work done without taking your time from the new JSR. Additionally, it gives forum members, who can’t get Developer status on JOGL because the team is kept very small, a chance to contribute to this great project, get a little kudos for it, and feel great. I know of a few small things I’d submit, and I’d love to say some of my code was being distributed with JOGL.
Anybody have any suggestions / comments / TESTED and LICENSE-FRIENDLY submissions?