r1330 - in trunk/code: renderer sdl

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Sun Apr 27 15:07:57 EDT 2008


Author: thilo
Date: 2008-04-27 15:07:57 -0400 (Sun, 27 Apr 2008)
New Revision: 1330

Modified:
   trunk/code/renderer/tr_cmds.c
   trunk/code/sdl/sdl_glimp.c
Log:
This may enable stereo rendering for other devices like shutter glasses, but I don't know whether this works yet.


Modified: trunk/code/renderer/tr_cmds.c
===================================================================
--- trunk/code/renderer/tr_cmds.c	2008-04-27 17:43:35 UTC (rev 1329)
+++ trunk/code/renderer/tr_cmds.c	2008-04-27 19:07:57 UTC (rev 1330)
@@ -91,9 +91,6 @@
 			ri.Printf( PRINT_ALL, "...failed.\n" );
 		}
 	}
-
-	if(r_stereoEnabled->integer)
-		glConfig.stereoEnabled = qtrue;
 }
 
 /*

Modified: trunk/code/sdl/sdl_glimp.c
===================================================================
--- trunk/code/sdl/sdl_glimp.c	2008-04-27 17:43:35 UTC (rev 1329)
+++ trunk/code/sdl/sdl_glimp.c	2008-04-27 19:07:57 UTC (rev 1330)
@@ -316,6 +316,18 @@
 		SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, sdlcolorbits );
 		SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, tdepthbits );
 		SDL_GL_SetAttribute( SDL_GL_STENCIL_SIZE, tstencilbits );
+
+		if(r_stereoEnabled->integer)
+		{
+			glConfig.stereoEnabled = qtrue;
+			SDL_GL_SetAttribute(SDL_GL_STEREO, 1);
+		}
+		else
+		{
+			glConfig.stereoEnabled = qfalse;
+			SDL_GL_SetAttribute(SDL_GL_STEREO, 0);
+		}
+		
 		SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 );
 
 #if 0 // See http://bugzilla.icculus.org/show_bug.cgi?id=3526




More information about the quake3-commits mailing list