summaryrefslogtreecommitdiffstats
path: root/pts/test-resources/glmark/install.sh
blob: 2272d8d3bd62cbe941c612610799531d3eaee4cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/bin/sh

tar -xvf GLMark-0.5.2.tar.gz
cd GLMark-0.5.2/

patch -p0 <<'EOT'
--- main.cpp	2008-04-26 04:30:21.000000000 -0400
+++ main.cpp.n	2008-05-25 10:21:22.000000000 -0400
@@ -17,16 +17,11 @@
     printf("===================================================\n");
     printf("    GLMark 08\n");
     printf("===================================================\n");
-    
-    printf("Enter screen width:  ");
-    scanf("%d", &screen.mWidth);
-    printf("Enter screen height: ");
-    scanf("%d", &screen.mHeight);
-    printf("Enter screen bpp:    ");
-    scanf("%d", &screen.mBpp);
-    printf("Enter '1' for fullscreen '0' for windowed: ");
-    scanf("%d", &screen.mFullScreen);
-    
+
+    screen.mWidth = atoi(argv[1]);
+    screen.mHeight = atoi(argv[2]);
+    screen.mBpp = 24;
+    screen.mFullScreen = 1;  
 
     printf("===================================================\n");
     if(!screen.init())
EOT

make -j $NUM_CPU_JOBS
cd ..

echo "#!/bin/sh

cd GLMark-0.5.2/

rm -f *.result
./glmark \$@ > \$THIS_RUN_TIME.result

case \"\$5\" in
\"VERTEX_ARRAY\")
	cat \$THIS_RUN_TIME.result | grep \"Vertex array\"
	;;
\"VERTEX_BUFFER_OBJ\")
	cat \$THIS_RUN_TIME.result | grep \"Vertex buffer object\"
	;;
\"TEXTURE_LINEAR\")
	cat \$THIS_RUN_TIME.result | grep \"Linear\"
	;;
\"TEXTURE_MIPMAPPED\")
	cat \$THIS_RUN_TIME.result | grep \"Mipmapped\"
	;;
\"GLSL_PER_VERTEX\")
	cat \$THIS_RUN_TIME.result | grep \"GLSL per vertex lighting\"
	;;
\"GLSL_PER_PIXEL\")
	cat \$THIS_RUN_TIME.result | grep \"GLSL per pixel lighting\"
	;;
esac
" > glmark
chmod +x glmark