view3d

changeset 5:58ddd42848f9

foo
author John Tsiombikas <nuclear@mutantstargoat.com>
date Thu, 19 Jan 2012 07:37:31 +0200
parents 0aee5df08cfc
children cfd22a190353
files src/main.c src/scene.c
diffstat 2 files changed, 31 insertions(+), 1 deletions(-) [+]
line diff
     1.1 --- a/src/main.c	Thu Jan 19 07:03:47 2012 +0200
     1.2 +++ b/src/main.c	Thu Jan 19 07:37:31 2012 +0200
     1.3 @@ -241,6 +241,36 @@
     1.4  		glutPostRedisplay();
     1.5  		break;
     1.6  
     1.7 +	case 'f':
     1.8 +		{
     1.9 +			static int fullscr;
    1.10 +			if(++fullscr & 1) {
    1.11 +				glutFullScreen();
    1.12 +			} else {
    1.13 +				glutPositionWindow(20, 20);
    1.14 +			}
    1.15 +		}
    1.16 +		break;
    1.17 +
    1.18 +		{
    1.19 +			static float bgval;
    1.20 +	case '=':
    1.21 +			bgval += 0.1;
    1.22 +			if(bgval > 1.0)
    1.23 +				bgval = 1.0;
    1.24 +			glClearColor(bgval, bgval, bgval, 1.0);
    1.25 +			glutPostRedisplay();
    1.26 +			break;
    1.27 +
    1.28 +	case '-':
    1.29 +			bgval -= 0.1;
    1.30 +			if(bgval < 0.0)
    1.31 +				bgval = 0.0;
    1.32 +			glClearColor(bgval, bgval, bgval, 1.0);
    1.33 +			glutPostRedisplay();
    1.34 +			break;
    1.35 +		}
    1.36 +
    1.37  	default:
    1.38  		break;
    1.39  	}
     2.1 --- a/src/scene.c	Thu Jan 19 07:03:47 2012 +0200
     2.2 +++ b/src/scene.c	Thu Jan 19 07:37:31 2012 +0200
     2.3 @@ -26,7 +26,7 @@
     2.4  	const struct aiScene *aiscn;
     2.5  	unsigned int proc_flags = aiProcess_JoinIdenticalVertices |
     2.6  		aiProcess_PreTransformVertices | aiProcess_Triangulate |
     2.7 -		aiProcess_GenNormals | aiProcess_SortByPType;
     2.8 +		aiProcess_GenNormals | aiProcess_SortByPType | aiProcess_FlipUVs;
     2.9  
    2.10  	if(!(aiscn = aiImportFile(fname, proc_flags))) {
    2.11  		fprintf(stderr, "failed to load: %s\n", fname);