Current Stable Release: 1.2.5
Current Development Release: ---

NEWS: There is an announcement mailing list now.
If you're looking for intel2gas, that's here!
Quick download
Stable Release (tar.gz)
Stable Release (zip)
Stable Release (rpm)
---
rpm for i386 only.
---
debian packages

 
Navigation
Description
Details
Applicability
Documentation
Download

 
Authors
Christian Nentwich
Mikko Tiihonen
Glenn Fiedler

 
Related Projects
PTC (graphics library)
SDL (graphics library)
ClanLib (take a guess)

 
 
 
 
 
 
 

 

Description

Hermes is a library that does the dirty work of a graphics library or application that nobody else wants to do, and it does it fast because the effort is concentrated on just that. The thing nobody wants to do is conversion between pixel formats - between all pixel formats that is, not between any two. There are handwritten assembler routines in Hermes that should make anything look fast.

An application or library that uses Hermes will for example be able to render into one buffer and convert it to whatever pixel format is available on the target platform at the time. 

Other services provided by Hermes include palette handling including caching of lookup tables, and surface clearing to a specific colour value.

Hermes is free software (speech, not beer! :) under the terms of the GNU Library General Public License (LGPL).
 
 
Details

There are three things Hermes will do for you:

  • Handling of palettes
  • Conversion of surfaces from one pixel format to another or just straight copying. That includes
    • converting most common formats quickly with special converters
    • falling back to generic converters if there is no such thing for a weird format
    • stretching surfaces during conversion if possible
    • dithering if you request it
  • Clearing of surfaces to a specific colour
Hermes implements almost all its function using an internal caching system, thus things like lookup table generation for palettes are extremely fast.

On x86 or MMX CPUs, Hermes will also accomplish this task using handwritten assembler routines, depending on the processor it is autodetecting. Although in many areas it is futile to try to outperform a compiler using handwritten routines, on CISC CPUs like Intel's and specific tasks like shift-and-add colour conversion, handwritten routines are still ahead by sometimes up to 30%.

As for platforms, Hermes does not include any system calls at all apart from stdio things, therefore, when assembler routines are left out, it should compile with any ANSI C compiler. Hermes is known to work on the following:

  • Any UNIX system. Under Linux and FreeBSD it uses assembler routines. Hermes works correctly on big endian machines.
  • DOS, with Watcom C, assembler support
  • DOS, with DJGPP v2, assembler support
  • Windows, with Visual C (no assembler support at the moment)
New: Features in the development version:
  • Support for multiple colour spaces (YUV, CMY, you name it)
  • A rewritten converter request system that is much more fine-grained and allows different features to be combined.
  • Support for: Alpha blending, colour key, dithering, stretching using bilinear interpolation and almost any combination of those. (A subset of the closure of the previous features, for you math freaks :)
  • Plugin loading on systems that support dynamic libraries (at the moment, Linux, Windows soon). Lets the users of your program mess up the rendering without you noticing :)
If you want the development version, you have to get it from the CVS server, at least for the time being.

Applicability

Hermes is intended for use in graphics libraries or directly in graphics programs. In the beginning the goal was to provide the fastest possible routines for the purpose Hermes was designed for, thus the target were fast graphics libraries for games and the sort. However, lately more and more choice for high-quality rendering is being built in so things like photorealistic rendering software might profit from the speed of Hermes in the very near future.

The library is straight-forward to use. There are about 8 functions you will need to know about for a simple application and probably  twice as many for a more complicated one. It should take about 10 minutes to build Hermes into your code.
 
 

Everything on this page (c)1998 Christian Nentwich.