OpenGL-HQ for SDL
OpenGL-HQ is a video "driver" for SDL that uses graphics hardware to scale the output to any size you want. It uses an algorithm similar to the popular "hq2x" scaling method, but runs it entirely on a modern graphics card, and with arbitrary scaling factors (including fractional and separate horizontal/vertical factors).
It was originally written for 2D games/emulators like dosbox, scummvm or exult. Due to the approach of implementing it as an SDL video driver, any SDL-using 2D program can be scaled. Of course, this excludes those that use SDL simply as a cross-platform wrapper around OpenGL 3D rendering or just for sound.
It should work just as well for, say, the SDL X server or VirtualBox's SDL frontend. QEmu has actually been confirmed working fine with OpenGL-HQ. Scaling legacy applications to the higher resolutions of modern displays this way reduces fuzziness, making work more ergonomic.
Features
- uses your hardware to get fast scaling, thus freeing the CPU
- scales any 2D SDL program
- scales with any scaling factor, even fractional ones
- switches back to the native driver if an app tries to use OpenGL
- portable
- configurable like SDL
- see the screenshots, really
- robust and compatible: still works well, even 10 years after its conception
Screenshots
Warning: Some of these are several hundred kilobytes large.
- Exult opening screen, windowed with aspect correction, scaling factor 3/3.6
- Exult in-game, fullscreen without aspect correction, scaling factor 4
- ScummVM running Indy4, fullscreen without aspect correction, scaling factor 4
- ScummVM running Indy4, windowed with aspect correction, scaling factor 3/3.6
- DosBox running X-Com, windowed without aspect correction, scaling factor 3.33
- DosBox command line, windowed without aspect correction, scaling factor 1.66
- DosBox running X-Com, full-screen without aspect correction, scaling factor 4
- Hatari running Deuteros, full-screen without aspect correction, scaling factor 4
- d2x, windowed with aspect correction
- Linux port of a certain 3D shooter, windowed with aspect correction
- JJFFE with 640x400 hi-res patch, windowed with aspect correction
- MAME running Afterburner 2, full-screen without aspect correction
- ZSNES running Wizardry I/II/III, full-screen without aspect correction
- QEmu running Arcomage on Win98, windowed with aspect correction
- GemRB running Baldur's Gate, full-screen with aspect correction
Requirements
- The SDL source distribution of the 1.2 release series.
- a Radeon 9600, GeForce FX 5700 or higher with good OpenGL support: OpenGL extension ARB_fragment_program must be supported and hardware-accelerated, EXT_framebuffer_object is also needed.
- OpenGL support for your OS in SDL (which means Windows, Linux/X11 or MacOS X at the moment)
There is a highly experimental, slower and slightly ugly version that works with many X11 open source drivers (those that support ARB_fragment_program, but do not yet implement EXT_frambeuffer_object). It will be used as a fallback automatically.
How to use
If you're running on Windows, there might be a prebuilt SDL.DLL included in the source archive, depending on contributors. Copy it to your application directory, overwriting the old SDL.DLL. Then read the file README contained in the archive to see how to enable it.
On all other platforms, first build the custom version, then replace your current SDL dynamic library or use your OS mechanism to override the library path on a per-program base. Usually you can just replace your system SDL installation, because as long as you don't enable OpenGL-HQ, it's just a regular copy of SDL.
The README included in the tarball contains more detailed instructions.
Trouble?
In case of trouble, read the file README contained in the archive. It addresses most problems you might encounter.
Downloads / Version History
Since updates usually only fix bugs or improve compatibility, there is no detailed version history. Check the archive directory and pick the newest file.
License
SDL OpenGL-HQ is distributed under the terms of the GNU Lesser General Public License (LGPL) Version 2 or later.