//return 1111111111111111;
}
-int Game::DrawGLScene(void)
+int Game::DrawGLScene(StereoSide side)
{
static float texcoordwidth,texcoordheight;
static float texviewwidth, texviewheight;
lastcheck+=multiplier;
- glColorMask( 1.0, 1.0, 1.0, 1.0 );
-
+ if ( stereomode == stereoAnaglyph ) {
+ switch(side) {
+ case stereoLeft: glColorMask( 0.0, 1.0, 1.0, 1.0 ); break;
+ case stereoRight: glColorMask( 1.0, 0.0, 0.0, 1.0 ); break;
+ }
+ } else {
+ glColorMask( 1.0, 1.0, 1.0, 1.0 );
+
+ if ( stereomode == stereoHorizontalInterlaced || stereomode == stereoVerticalInterlaced ) {
+ glStencilFunc(side == stereoLeft ? GL_NOTEQUAL : GL_EQUAL, 0x01, 0x01);
+ }
+ }
if(freeze||winfreeze||(mainmenu&&gameon)||(!gameon&&gamestarted)){
tempmult=multiplier;
glMatrixMode (GL_MODELVIEW);
glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
glLoadIdentity ();
+
+ // Move the camera for the current eye's point of view.
+ // Reverse the movement if we're reversing stereo
+ glTranslatef((stereoseparation/2) * side * (stereoreverse ? -1 : 1), 0, 0);
+
if(!cameramode&&!freeze&&!winfreeze){
glRotatef(float(Random()%100)/10*camerashake/*+(woozy*woozy)/10*/,0,0,1);
glRotatef(rotation2+sin(woozy/2)*(player[0].damage/player[0].damagetolerance)*5,1,0,0);
if(texdetail>2)texdetail=2;
if(mainmenu!=oldmainmenu&&oldmainmenu!=0){
if(mainmenu==1){
- LoadTexture("/Data/Textures/Newgame.png",&Mainmenuitems[1],0,0);
- LoadTexture("/Data/Textures/Quit.png",&Mainmenuitems[3],0,0);
+ LoadTexture(":Data:Textures:Newgame.png",&Mainmenuitems[1],0,0);
+ LoadTexture(":Data:Textures:Quit.png",&Mainmenuitems[3],0,0);
/*if(oldmainmenu==1||oldmainmenu==0){
- LoadTexture("/Data/Textures/World.png",&Mainmenuitems[7],0,0);
- LoadTexture("/Data/Textures/Options.png",&Mainmenuitems[2],0,0);
- LoadTexture("/Data/Textures/Lugaru.png",&Mainmenuitems[0],0,0);
+ LoadTexture(":Data:Textures:World.png",&Mainmenuitems[7],0,0);
+ LoadTexture(":Data:Textures:Options.png",&Mainmenuitems[2],0,0);
+ LoadTexture(":Data:Textures:Lugaru.png",&Mainmenuitems[0],0,0);
loaddistrib=0;
}*/
}
if(mainmenu==2){
- LoadTexture("/Data/Textures/Resume.png",&Mainmenuitems[1],0,0);
- LoadTexture("/Data/Textures/Endgame.png",&Mainmenuitems[3],0,0);
+ LoadTexture(":Data:Textures:Resume.png",&Mainmenuitems[1],0,0);
+ LoadTexture(":Data:Textures:Endgame.png",&Mainmenuitems[3],0,0);
/*if(oldmainmenu==2||oldmainmenu==0){
- LoadTexture("/Data/Textures/World.png",&Mainmenuitems[7],0,0);
- LoadTexture("/Data/Textures/Options.png",&Mainmenuitems[2],0,0);
- LoadTexture("/Data/Textures/Lugaru.png",&Mainmenuitems[0],0,0);
+ LoadTexture(":Data:Textures:World.png",&Mainmenuitems[7],0,0);
+ LoadTexture(":Data:Textures:Options.png",&Mainmenuitems[2],0,0);
+ LoadTexture(":Data:Textures:Lugaru.png",&Mainmenuitems[0],0,0);
loaddistrib=0;
}*/
}
}
if(lastcheck>.5||oldmainmenu!=mainmenu){
if(mainmenu==5){
- ifstream ipstream(ConvertFileName("/Data/Campaigns/main.txt"));
+ ifstream ipstream(ConvertFileName(":Data:Campaigns:main.txt"));
//campaignnumlevels=0;
//accountcampaignchoicesmade[accountactive]=0;
ipstream.ignore(256,':');
//glFlush();
- if(drawmode!=motionblurmode||mainmenu){
-
- swap_gl_buffers();
- }
+ if ( side == stereoRight || side == stereoCenter ) {
+ if(drawmode!=motionblurmode||mainmenu){
+ swap_gl_buffers();
+ }
+ }
//myassert(glGetError() == GL_NO_ERROR);
glDrawBuffer(GL_BACK);