[quake3-commits] r2198 - in trunk: . code/renderer

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Fri Nov 18 07:47:42 EST 2011


Author: thilo
Date: 2011-11-18 07:47:42 -0500 (Fri, 18 Nov 2011)
New Revision: 2198

Modified:
   trunk/README
   trunk/code/renderer/tr_cmds.c
Log:
Add color combination green-magenta for anaglyph


Modified: trunk/README
===================================================================
--- trunk/README	2011-11-10 04:49:07 UTC (rev 2197)
+++ trunk/README	2011-11-18 12:47:42 UTC (rev 2198)
@@ -245,8 +245,9 @@
                                       red-cyan glasses:    1
                                       red-blue:            2
                                       red-green:           3
+                                      green-magenta:       4
                                       To swap the colors for left and right eye
-                                      just add 3 to the value for the wanted
+                                      just add 4 to the value for the wanted
                                       color combination. For red-blue and
                                       red-green you probably want to enable
                                       r_greyscale

Modified: trunk/code/renderer/tr_cmds.c
===================================================================
--- trunk/code/renderer/tr_cmds.c	2011-11-10 04:49:07 UTC (rev 2197)
+++ trunk/code/renderer/tr_cmds.c	2011-11-18 12:47:42 UTC (rev 2198)
@@ -297,7 +297,8 @@
 #define MODE_RED_CYAN	1
 #define MODE_RED_BLUE	2
 #define MODE_RED_GREEN	3
-#define MODE_MAX	MODE_RED_GREEN
+#define MODE_GREEN_MAGENTA 4
+#define MODE_MAX	MODE_GREEN_MAGENTA
 
 void R_SetColorMode(GLboolean *rgba, stereoFrame_t stereoFrame, int colormode)
 {
@@ -313,17 +314,27 @@
 		colormode -= MODE_MAX;
 	}
 	
-	if(stereoFrame == STEREO_LEFT)
-		rgba[1] = rgba[2] = GL_FALSE;
-	else if(stereoFrame == STEREO_RIGHT)
+	if(colormode == MODE_GREEN_MAGENTA)
 	{
-		rgba[0] = GL_FALSE;
-		
-		if(colormode == MODE_RED_BLUE)
+		if(stereoFrame == STEREO_LEFT)
+			rgba[0] = rgba[2] = GL_FALSE;
+		else if(stereoFrame == STEREO_RIGHT)
 			rgba[1] = GL_FALSE;
-		else if(colormode == MODE_RED_GREEN)
-			rgba[2] = GL_FALSE;
 	}
+	else
+	{
+		if(stereoFrame == STEREO_LEFT)
+			rgba[1] = rgba[2] = GL_FALSE;
+		else if(stereoFrame == STEREO_RIGHT)
+		{
+			rgba[0] = GL_FALSE;
+		
+			if(colormode == MODE_RED_BLUE)
+				rgba[1] = GL_FALSE;
+			else if(colormode == MODE_RED_GREEN)
+				rgba[2] = GL_FALSE;
+		}
+	}
 }
 
 



More information about the quake3-commits mailing list