The latest CVS snapshot is now available:
- Merged patch to properly map Linux console scancodes
- Improved IMPS/2 detection on framebuffer console
- Fixed typo in SDL_joystick.c
- Disabled aggresive gcc optimizations on X86
- Added support for blitting with GL (thanks Daniel Vogel)
- Improved the speed of the 16-bit colorkey copy blit
- Fixed pthread condition variable timeout
So what is this SDL_OPENGLBLIT stuff?
(Note: This has only been tested on Linux/X11)
Daniel Vogel wrote a special framebuffer mode that is uploaded to the
OpenGL card as a texture when you call SDL_Flip() or SDL_UpdateRects().
This reduces performance, but has the advantage of being able to use
SDL to handle 2D elements of your game (like HUD displays, etc.) while
using 3D for the action. This technique is being used for the Building
Architect Tool for the SimCity 3K Unlimited port.
To use this code, pass the SDL_OPENGLBLIT flag to the SDL_SetVideoMode()
call, and perform your SDL blitting normally. See the testgl.c program
for an example of this technique.
The copy blits have been modified to respect the destination alpha, as
this is used by OpenGL to determine which parts of the SDL screen are
opaque. Colorkey blits have not been fixed yet (to be done). I’ll
leave it as an excercise for the reader to figure out how to have a
translucent HUD overlay.
Daniel can be contacted for discussion and suggestions at:
vogel at lokigames.com
-Sam Lantinga, Lead Programmer, Loki Entertainment Software