patch for Solaris x86

Jake Goerzen <[email protected]> Tue, 26 Jul 2005 22:39:15 +0200
Newsgroups gmane.comp.video.ogle.devel
Message-ID <[email protected]>
Greetings ogle developers,

  I'm using the latest ogle-cvs with Sun Studio 8 compiler on Solaris x86.  There is something strange going on with the color conversion when using MediaLib (on x86 only).  I get a greenish picture.  I'll bet it has to do with the byte order of the Xserver.  I've spent some time with the source code and would like to contribute some patches as I figure out what is going on.  Attached is a patch to ogle_endian.h for Solaris x86 to use ntohs() & ntohl() functions instead of c bitshifts.

Thanks,
Jake Goerzen
[email protected]

PS.  I want to get ogle + suncc + medialib working on Solaris x86 because Solaris 10 ships with an SSE accelerated MediaLib.  (Previous x86 MediaLib's did only slow c conversion).
ogle_endian.h.patch (text/plain, 153 B)
52a53,56
> #elif defined(__sun) && defined(__i386)
> #  include <netinet/in.h>
> #  define FROM_BE_16(x) (ntohs(x))
> #  define FROM_BE_32(x) (ntohl(x))