summaryrefslogtreecommitdiff
path: root/src/renderer
diff options
context:
space:
mode:
authorThilo Schulz <arny@ats.s.bawue.de>2011-11-18 12:47:42 +0000
committerTim Angus <tim@ngus.net>2013-01-12 20:13:59 +0000
commitc297a167547ef944f7e9192dc27b5b13bc48ba69 (patch)
tree1449ad39badc5f3987980942ee9c8f599a9e0050 /src/renderer
parent179e0da78344f2a08f273cabd29ec8885201021e (diff)
Add color combination green-magenta for anaglyph
Diffstat (limited to 'src/renderer')
-rw-r--r--src/renderer/tr_cmds.c29
1 files changed, 20 insertions, 9 deletions
diff --git a/src/renderer/tr_cmds.c b/src/renderer/tr_cmds.c
index 6eba4162..30088429 100644
--- a/src/renderer/tr_cmds.c
+++ b/src/renderer/tr_cmds.c
@@ -383,7 +383,8 @@ void RE_StretchPic ( float x, float y, float w, float h,
#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)
{
@@ -399,16 +400,26 @@ void R_SetColorMode(GLboolean *rgba, stereoFrame_t stereoFrame, int colormode)
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;
+ }
}
}