SDL OpenGL scaling backend

Hi,

I’ve made a new SDL video backend that uses OpenGL to scale the display.
This backend uses another backend to get the window creation and
keyboard handling stuff, so it’s “portable”. For now, it’s only tested
under linux/X11/i386 but it should work for other platforms with OpenGL
support. It’s by no means fast, but (I hope) it can be useful.

Get the patch here :
http://icps.u-strasbg.fr/~marchesin/sdl_glscale.patch

To use it do a :
export SDL_VIDEODRIVER=glscale
and then if you want to choose the new screen size :
export SDL_VIDEODRIVER_GLSCALE_X=desired width
export SDL_VIDEODRIVER_GLSCALE_Y=desired height
By defaut, a 2x window scaling is used.

Feedback is welcome !

Stephane

Hi,

I’ve made a new SDL video backend that uses OpenGL to scale the display.
This backend uses another backend to get the window creation and
keyboard handling stuff, so it’s “portable”. For now, it’s only tested
under linux/X11/i386 but it should work for other platforms with OpenGL
support. It’s by no means fast, but (I hope) it can be useful.

Get the patch here :
http://icps.u-strasbg.fr/~marchesin/sdl_glscale.patch

What’s the performance? It looks like it might be very slow (?)

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment

Sam Lantinga wrote:

Hi,

I’ve made a new SDL video backend that uses OpenGL to scale the display.
This backend uses another backend to get the window creation and
keyboard handling stuff, so it’s “portable”. For now, it’s only tested
under linux/X11/i386 but it should work for other platforms with OpenGL
support. It’s by no means fast, but (I hope) it can be useful.

Get the patch here :
http://icps.u-strasbg.fr/~marchesin/sdl_glscale.patch

What’s the performance? It looks like it might be very slow (?)

It really depends on the application. With some games (usually using
updaterects many times per frame) it can be very slow, while with others
(doublebuffered ones) I can play games fine on a 433 celeron with a TNT2.
Well, it’s just a first try, I still have to improve it (implement a
real updaterects function, improve performance, fix some bugs…).

Stephane