istereo

diff src/glutmain.c @ 24:70309d71c899

added the texture translation
author John Tsiombikas <nuclear@mutantstargoat.com>
date Thu, 08 Sep 2011 03:06:46 +0300
parents 557d86c8d7ed
children 3d933b796ad2
line diff
     1.1 --- a/src/glutmain.c	Thu Sep 08 02:57:29 2011 +0300
     1.2 +++ b/src/glutmain.c	Thu Sep 08 03:06:46 2011 +0300
     1.3 @@ -12,7 +12,7 @@
     1.4  int main(int argc, char **argv)
     1.5  {
     1.6  	glutInit(&argc, argv);
     1.7 -	glutInitWindowSize(640, 960);
     1.8 +	glutInitWindowSize(960, 640);
     1.9  	glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE);
    1.10  	glutCreateWindow("test");
    1.11  
    1.12 @@ -38,12 +38,27 @@
    1.13  	glutSwapBuffers();
    1.14  }
    1.15  
    1.16 +extern int stereo;
    1.17 +
    1.18  void keyb(unsigned char key, int x, int y)
    1.19  {
    1.20  	switch(key) {
    1.21  	case 27:
    1.22  		exit(0);
    1.23  
    1.24 +	case 's':
    1.25 +		stereo = !stereo;
    1.26 +		break;
    1.27 +
    1.28 +	case '`':
    1.29 +		{
    1.30 +			int xsz = glutGet(GLUT_WINDOW_WIDTH);
    1.31 +			int ysz = glutGet(GLUT_WINDOW_HEIGHT);
    1.32 +
    1.33 +			glutReshapeWindow(ysz, xsz);
    1.34 +		}
    1.35 +		break;
    1.36 +
    1.37  	default:
    1.38  		break;
    1.39  	}