[Fuse-for-macosx-commits] SF.net SVN: fuse-for-macosx: [392] trunk/fuse/fusepb/views/ DisplayOpenGL
Brought to you by:
fredm
|
From: <fr...@us...> - 2007-06-20 03:56:22
|
Revision: 392
http://svn.sourceforge.net/fuse-for-macosx/?rev=392&view=rev
Author: fredm
Date: 2007-06-19 20:56:24 -0700 (Tue, 19 Jun 2007)
Log Message:
-----------
Fix texture colours on bigendian machines.
Modified Paths:
--------------
trunk/fuse/fusepb/views/DisplayOpenGLView.m
Modified: trunk/fuse/fusepb/views/DisplayOpenGLView.m
===================================================================
--- trunk/fuse/fusepb/views/DisplayOpenGLView.m 2007-06-20 02:25:45 UTC (rev 391)
+++ trunk/fuse/fusepb/views/DisplayOpenGLView.m 2007-06-20 03:56:24 UTC (rev 392)
@@ -65,9 +65,16 @@
int i;
for( i = 0; i < targetWidth * targetHeight; i++ ) {
+#ifdef WORDS_BIGENDIAN
+ pixels[i*4+3] = red ? pixels[i*4+0] : 0; // r on ppc
+ pixels[i*4+2] = red ? 0 : pixels[i*4+1]; // g on ppc
+ pixels[i*4+0] = 0;
+ pixels[i*4+1] = 0;
+#else /* #ifdef WORDS_BIGENDIAN */
pixels[i*4+0] = red ? pixels[i*4+0] : 0; // r on i386
pixels[i*4+1] = red ? 0 : pixels[i*4+1]; // g on i386
pixels[i*4+2] = 0;
+#endif /* #ifdef WORDS_BIGENDIAN */
}
[bitmap2 release];
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|