Hi Karlos,
> I have written a C++ based portability layer (still in
> development) that encapsulates many things
> useful for your project
I believe we are doing pretty much the same thing (at least we have similar goals). GLFW is: portable, minimalist, very compact (a 68k Amiga executable is usually ~25 KB, the Windows DLL is 30 KB), extremely easy to use & powerful.
The major difference, as I see it, is that I use pure C, not C++. I don't like C++ for these kinds of things, since:
1) It's not as portable as C (no, not yet at least)
2) It's quite difficult to turn a C++ interface into a shared library
3) You can't use C++ interfaces from alternate languages (such as Borland Delphi, Visual Basic, Fortran, Python etc)
Maybe we can exchange experiences? You are of course free to "rip" the GLFW code if there is something that you find useful (the GLFW license is extremely liberal).
If you don't feel like downloading the whole pack, you can always browse the Sourceforge CVS tree:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/glfw/> class MyApplication : private AppBase, FullscreenDB {
>
> };
>
> Does 90% of the work for you
In GLFW you usually do:
------------------------------------------------
glfwInit();
glfwOpenWindow( 640, 480, 8,8,8,0, 24,0, GLFW_FULLSCREEN );
do
{
glfwSwapBuffers();
running = !glfwGetKey( GLFW_KEY_ESC ) && glfwGetWindowParam( GLFW_OPENED );
}
while( running );
glfwTerminate();
------------------------------------------------
That's a complete GLFW application with input, double buffering and a "main loop" (you can do it differently too, e.g. with callback functions for input etc). I agree, not very OO, but I believe that it's not too ugly to write a C++ class on top of GLFW, if that suits your project better than the programmatic C interface.
> 6) Audio classes (fell a bit behind there).
Recommendation: stay away from audio! People tend to underestimate the complexity of audio. You have two choices:
1) Make a fullfeatured, complete audio interface (sound samples, MP3, mixing, 3D aureal emulation, music playback, CD music handling etc)
2) Ditch it and use a 3rd party toolkit (libMikMod, FMOD, OpenAL etc)
If you make a simplistic interface (a-la SDL), professional people will not want to use it anyway, rendering your effort useless and the interface bloated.