CVS update (SDL_OPENGLBLIT)

The latest CVS snapshot is now available:
http://www.libsdl.org/cvs.html

Changes:

  • 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. :slight_smile:

Daniel can be contacted for discussion and suggestions at:
vogel at lokigames.com

Enjoy!
-Sam Lantinga, Lead Programmer, Loki Entertainment Software

Hi,

I got the following error while compiling SDL (CVS 6/14):

SDL_dgaevents.c: In function DGA_DispatchEvent': SDL_dgaevents.c:47:XDGAEvent’ undeclared (first use in this function)
SDL_dgaevents.c:47: (Each undeclared identifier is reported only once
SDL_dgaevents.c:47: for each function it appears in.)
SDL_dgaevents.c:47: parse error before xevent' SDL_dgaevents.c:49:xevent’ undeclared (first use in this function)
SDL_dgaevents.c:57: warning: unreachable code at beginning of switch
statement

Thanks,
Melvin

Hi,

I got the following error while compiling SDL (CVS 6/14):

SDL_dgaevents.c: In function DGA_DispatchEvent': SDL_dgaevents.c:47:XDGAEvent’ undeclared (first use in this function)
SDL_dgaevents.c:47: (Each undeclared identifier is reported only once
SDL_dgaevents.c:47: for each function it appears in.)
SDL_dgaevents.c:47: parse error before xevent' SDL_dgaevents.c:49:xevent’ undeclared (first use in this function)
SDL_dgaevents.c:57: warning: unreachable code at beginning of switch
statement

Can you send the output of configure to me at @slouken?

Thanks,
-Sam Lantinga, Lead Programmer, Loki Entertainment Software