Merge branch 'mesa_7_5_branch'
This commit is contained in:
commit
2fe65e8f14
|
@ -1,6 +1,7 @@
|
||||||
SConscript([
|
SConscript([
|
||||||
'util/SConscript',
|
'util/SConscript',
|
||||||
'demos/SConscript',
|
'demos/SConscript',
|
||||||
|
'glsl/SConscript',
|
||||||
'redbook/SConscript',
|
'redbook/SConscript',
|
||||||
'samples/SConscript',
|
'samples/SConscript',
|
||||||
'tests/SConscript',
|
'tests/SConscript',
|
||||||
|
|
|
@ -0,0 +1,55 @@
|
||||||
|
Import('*')
|
||||||
|
|
||||||
|
if not env['GLUT']:
|
||||||
|
Return()
|
||||||
|
|
||||||
|
env = env.Clone()
|
||||||
|
|
||||||
|
env.Prepend(CPPPATH = [
|
||||||
|
'../util',
|
||||||
|
])
|
||||||
|
|
||||||
|
env.Prepend(LIBS = [
|
||||||
|
util,
|
||||||
|
'$GLUT_LIB'
|
||||||
|
])
|
||||||
|
|
||||||
|
if env['platform'] == 'windows':
|
||||||
|
env.Append(CPPDEFINES = ['NOMINMAX'])
|
||||||
|
env.Prepend(LIBS = ['winmm'])
|
||||||
|
|
||||||
|
progs = [
|
||||||
|
'array',
|
||||||
|
'bitmap',
|
||||||
|
'brick',
|
||||||
|
'bump',
|
||||||
|
'convolutions',
|
||||||
|
'deriv',
|
||||||
|
'fragcoord',
|
||||||
|
'identity',
|
||||||
|
'linktest',
|
||||||
|
'mandelbrot',
|
||||||
|
'multinoise',
|
||||||
|
'multitex',
|
||||||
|
'noise',
|
||||||
|
'noise2',
|
||||||
|
'pointcoord',
|
||||||
|
'points',
|
||||||
|
'samplers',
|
||||||
|
'shadow_sampler',
|
||||||
|
'skinning',
|
||||||
|
'texaaline',
|
||||||
|
'texdemo1',
|
||||||
|
'toyball',
|
||||||
|
'trirast',
|
||||||
|
'twoside',
|
||||||
|
'vert-or-frag-only',
|
||||||
|
'vert-tex',
|
||||||
|
]
|
||||||
|
|
||||||
|
for prog in progs:
|
||||||
|
env.Program(
|
||||||
|
target = prog,
|
||||||
|
source = prog + '.c',
|
||||||
|
)
|
||||||
|
|
|
@ -9,9 +9,9 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
#include <GL/glew.h>
|
||||||
#include <GL/gl.h>
|
#include <GL/gl.h>
|
||||||
#include <GL/glut.h>
|
#include <GL/glut.h>
|
||||||
#include <GL/glext.h>
|
|
||||||
#include "extfuncs.h"
|
#include "extfuncs.h"
|
||||||
#include "shaderutil.h"
|
#include "shaderutil.h"
|
||||||
|
|
||||||
|
@ -248,6 +248,7 @@ main(int argc, char *argv[])
|
||||||
glutInitWindowSize(500, 500);
|
glutInitWindowSize(500, 500);
|
||||||
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
|
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
|
||||||
win = glutCreateWindow(argv[0]);
|
win = glutCreateWindow(argv[0]);
|
||||||
|
glewInit();
|
||||||
glutReshapeFunc(Reshape);
|
glutReshapeFunc(Reshape);
|
||||||
glutKeyboardFunc(Key);
|
glutKeyboardFunc(Key);
|
||||||
glutSpecialFunc(SpecialKey);
|
glutSpecialFunc(SpecialKey);
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
#include <GL/glew.h>
|
||||||
#include <GL/gl.h>
|
#include <GL/gl.h>
|
||||||
#include <GL/glut.h>
|
#include <GL/glut.h>
|
||||||
#include <GL/glext.h>
|
#include <GL/glext.h>
|
||||||
|
@ -309,6 +310,7 @@ main(int argc, char *argv[])
|
||||||
glutInitWindowSize(WinWidth, WinHeight);
|
glutInitWindowSize(WinWidth, WinHeight);
|
||||||
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
|
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
|
||||||
Win = glutCreateWindow(argv[0]);
|
Win = glutCreateWindow(argv[0]);
|
||||||
|
glewInit();
|
||||||
glutReshapeFunc(Reshape);
|
glutReshapeFunc(Reshape);
|
||||||
glutKeyboardFunc(Key);
|
glutKeyboardFunc(Key);
|
||||||
glutSpecialFunc(SpecialKey);
|
glutSpecialFunc(SpecialKey);
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
#include <GL/glew.h>
|
||||||
#include <GL/gl.h>
|
#include <GL/gl.h>
|
||||||
#include <GL/glut.h>
|
#include <GL/glut.h>
|
||||||
#include <GL/glext.h>
|
#include <GL/glext.h>
|
||||||
|
@ -191,6 +192,7 @@ main(int argc, char *argv[])
|
||||||
glutInitWindowSize(400, 400);
|
glutInitWindowSize(400, 400);
|
||||||
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
|
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
|
||||||
win = glutCreateWindow(argv[0]);
|
win = glutCreateWindow(argv[0]);
|
||||||
|
glewInit();
|
||||||
glutReshapeFunc(Reshape);
|
glutReshapeFunc(Reshape);
|
||||||
glutKeyboardFunc(Key);
|
glutKeyboardFunc(Key);
|
||||||
glutSpecialFunc(SpecialKey);
|
glutSpecialFunc(SpecialKey);
|
||||||
|
|
|
@ -288,6 +288,7 @@ main(int argc, char *argv[])
|
||||||
glutInitWindowSize(400, 400);
|
glutInitWindowSize(400, 400);
|
||||||
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
|
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
|
||||||
win = glutCreateWindow(argv[0]);
|
win = glutCreateWindow(argv[0]);
|
||||||
|
glewInit();
|
||||||
glutReshapeFunc(Reshape);
|
glutReshapeFunc(Reshape);
|
||||||
glutKeyboardFunc(Key);
|
glutKeyboardFunc(Key);
|
||||||
glutSpecialFunc(SpecialKey);
|
glutSpecialFunc(SpecialKey);
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
* Author: Zack Rusin
|
* Author: Zack Rusin
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <GL/glew.h>
|
||||||
|
|
||||||
#define GL_GLEXT_PROTOTYPES
|
#define GL_GLEXT_PROTOTYPES
|
||||||
#include "readtex.h"
|
#include "readtex.h"
|
||||||
|
|
||||||
|
@ -455,6 +457,7 @@ int main(int argc, char **argv)
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
glewInit();
|
||||||
init();
|
init();
|
||||||
|
|
||||||
glutReshapeFunc(reshape);
|
glutReshapeFunc(reshape);
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
#include <GL/glew.h>
|
||||||
#include <GL/gl.h>
|
#include <GL/gl.h>
|
||||||
#include <GL/glut.h>
|
#include <GL/glut.h>
|
||||||
#include <GL/glext.h>
|
#include <GL/glext.h>
|
||||||
|
@ -228,6 +229,7 @@ main(int argc, char *argv[])
|
||||||
glutInitWindowSize(200, 200);
|
glutInitWindowSize(200, 200);
|
||||||
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
|
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
|
||||||
win = glutCreateWindow(argv[0]);
|
win = glutCreateWindow(argv[0]);
|
||||||
|
glewInit();
|
||||||
glutReshapeFunc(Reshape);
|
glutReshapeFunc(Reshape);
|
||||||
glutKeyboardFunc(Key);
|
glutKeyboardFunc(Key);
|
||||||
glutSpecialFunc(SpecialKey);
|
glutSpecialFunc(SpecialKey);
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
#include <GL/glew.h>
|
||||||
#include <GL/gl.h>
|
#include <GL/gl.h>
|
||||||
#include <GL/glut.h>
|
#include <GL/glut.h>
|
||||||
#include <GL/glext.h>
|
#include <GL/glext.h>
|
||||||
|
@ -174,6 +175,7 @@ main(int argc, char *argv[])
|
||||||
glutInitWindowSize(WinWidth, WinHeight);
|
glutInitWindowSize(WinWidth, WinHeight);
|
||||||
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
|
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
|
||||||
win = glutCreateWindow(argv[0]);
|
win = glutCreateWindow(argv[0]);
|
||||||
|
glewInit();
|
||||||
glutReshapeFunc(Reshape);
|
glutReshapeFunc(Reshape);
|
||||||
glutKeyboardFunc(Key);
|
glutKeyboardFunc(Key);
|
||||||
glutDisplayFunc(Redisplay);
|
glutDisplayFunc(Redisplay);
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
#include <GL/glew.h>
|
||||||
#include <GL/gl.h>
|
#include <GL/gl.h>
|
||||||
#include <GL/glut.h>
|
#include <GL/glut.h>
|
||||||
#include <GL/glext.h>
|
#include <GL/glext.h>
|
||||||
|
@ -195,6 +196,7 @@ main(int argc, char *argv[])
|
||||||
glutInitWindowSize(200, 200);
|
glutInitWindowSize(200, 200);
|
||||||
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
|
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
|
||||||
win = glutCreateWindow(argv[0]);
|
win = glutCreateWindow(argv[0]);
|
||||||
|
glewInit();
|
||||||
glutReshapeFunc(Reshape);
|
glutReshapeFunc(Reshape);
|
||||||
glutKeyboardFunc(Key);
|
glutKeyboardFunc(Key);
|
||||||
glutSpecialFunc(SpecialKey);
|
glutSpecialFunc(SpecialKey);
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
#include <GL/glew.h>
|
||||||
#include <GL/gl.h>
|
#include <GL/gl.h>
|
||||||
#include <GL/glut.h>
|
#include <GL/glut.h>
|
||||||
#include <GL/glext.h>
|
#include <GL/glext.h>
|
||||||
|
@ -245,6 +246,7 @@ main(int argc, char *argv[])
|
||||||
glutInitWindowSize(300, 300);
|
glutInitWindowSize(300, 300);
|
||||||
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
|
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
|
||||||
Win = glutCreateWindow(argv[0]);
|
Win = glutCreateWindow(argv[0]);
|
||||||
|
glewInit();
|
||||||
glutReshapeFunc(Reshape);
|
glutReshapeFunc(Reshape);
|
||||||
glutKeyboardFunc(Key);
|
glutKeyboardFunc(Key);
|
||||||
glutDisplayFunc(Redisplay);
|
glutDisplayFunc(Redisplay);
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
#include <GL/glew.h>
|
||||||
#include <GL/gl.h>
|
#include <GL/gl.h>
|
||||||
#include <GL/glut.h>
|
#include <GL/glut.h>
|
||||||
#include <GL/glext.h>
|
#include <GL/glext.h>
|
||||||
|
@ -206,6 +207,7 @@ main(int argc, char *argv[])
|
||||||
glutInitWindowSize(400, 400);
|
glutInitWindowSize(400, 400);
|
||||||
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
|
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
|
||||||
win = glutCreateWindow(argv[0]);
|
win = glutCreateWindow(argv[0]);
|
||||||
|
glewInit();
|
||||||
glutReshapeFunc(Reshape);
|
glutReshapeFunc(Reshape);
|
||||||
glutKeyboardFunc(Key);
|
glutKeyboardFunc(Key);
|
||||||
glutSpecialFunc(SpecialKey);
|
glutSpecialFunc(SpecialKey);
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
#include <GL/glew.h>
|
||||||
#include <GL/gl.h>
|
#include <GL/gl.h>
|
||||||
#include <GL/glut.h>
|
#include <GL/glut.h>
|
||||||
#include <GL/glext.h>
|
#include <GL/glext.h>
|
||||||
|
@ -270,6 +271,7 @@ main(int argc, char *argv[])
|
||||||
glutInitWindowSize(400, 400);
|
glutInitWindowSize(400, 400);
|
||||||
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
|
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
|
||||||
win = glutCreateWindow(argv[0]);
|
win = glutCreateWindow(argv[0]);
|
||||||
|
glewInit();
|
||||||
glutReshapeFunc(Reshape);
|
glutReshapeFunc(Reshape);
|
||||||
glutKeyboardFunc(Key);
|
glutKeyboardFunc(Key);
|
||||||
glutSpecialFunc(SpecialKey);
|
glutSpecialFunc(SpecialKey);
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <GL/glew.h>
|
||||||
#include "GL/glut.h"
|
#include "GL/glut.h"
|
||||||
#include "readtex.h"
|
#include "readtex.h"
|
||||||
#include "extfuncs.h"
|
#include "extfuncs.h"
|
||||||
|
@ -400,6 +401,7 @@ main(int argc, char *argv[])
|
||||||
glutInitWindowSize(500, 400);
|
glutInitWindowSize(500, 400);
|
||||||
glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE);
|
glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE);
|
||||||
glutCreateWindow(Demo);
|
glutCreateWindow(Demo);
|
||||||
|
glewInit();
|
||||||
glutReshapeFunc(Reshape);
|
glutReshapeFunc(Reshape);
|
||||||
glutKeyboardFunc(key);
|
glutKeyboardFunc(key);
|
||||||
glutSpecialFunc(specialkey);
|
glutSpecialFunc(specialkey);
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
#include <GL/glew.h>
|
||||||
#include <GL/gl.h>
|
#include <GL/gl.h>
|
||||||
#include <GL/glut.h>
|
#include <GL/glut.h>
|
||||||
#include <GL/glext.h>
|
#include <GL/glext.h>
|
||||||
|
@ -207,6 +208,7 @@ main(int argc, char *argv[])
|
||||||
glutInitWindowSize(400, 400);
|
glutInitWindowSize(400, 400);
|
||||||
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
|
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
|
||||||
win = glutCreateWindow(argv[0]);
|
win = glutCreateWindow(argv[0]);
|
||||||
|
glewInit();
|
||||||
glutReshapeFunc(Reshape);
|
glutReshapeFunc(Reshape);
|
||||||
glutKeyboardFunc(Key);
|
glutKeyboardFunc(Key);
|
||||||
glutSpecialFunc(SpecialKey);
|
glutSpecialFunc(SpecialKey);
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
#include <GL/glew.h>
|
||||||
#include <GL/gl.h>
|
#include <GL/gl.h>
|
||||||
#include <GL/glut.h>
|
#include <GL/glut.h>
|
||||||
#include <GL/glext.h>
|
#include <GL/glext.h>
|
||||||
|
@ -195,6 +196,7 @@ main(int argc, char *argv[])
|
||||||
glutInitWindowSize(WinWidth, WinHeight);
|
glutInitWindowSize(WinWidth, WinHeight);
|
||||||
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
|
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
|
||||||
win = glutCreateWindow(argv[0]);
|
win = glutCreateWindow(argv[0]);
|
||||||
|
glewInit();
|
||||||
glutReshapeFunc(Reshape);
|
glutReshapeFunc(Reshape);
|
||||||
glutKeyboardFunc(Key);
|
glutKeyboardFunc(Key);
|
||||||
glutDisplayFunc(Redisplay);
|
glutDisplayFunc(Redisplay);
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
#include <GL/glew.h>
|
||||||
#include <GL/gl.h>
|
#include <GL/gl.h>
|
||||||
#include <GL/glut.h>
|
#include <GL/glut.h>
|
||||||
#include <GL/glext.h>
|
#include <GL/glext.h>
|
||||||
|
@ -248,6 +249,7 @@ main(int argc, char *argv[])
|
||||||
glutInitWindowSize(WinWidth, WinHeight);
|
glutInitWindowSize(WinWidth, WinHeight);
|
||||||
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
|
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
|
||||||
Win = glutCreateWindow(argv[0]);
|
Win = glutCreateWindow(argv[0]);
|
||||||
|
glewInit();
|
||||||
glutReshapeFunc(Reshape);
|
glutReshapeFunc(Reshape);
|
||||||
glutKeyboardFunc(Key);
|
glutKeyboardFunc(Key);
|
||||||
glutSpecialFunc(SpecialKey);
|
glutSpecialFunc(SpecialKey);
|
||||||
|
|
|
@ -39,6 +39,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <GL/glew.h>
|
||||||
#include "GL/glut.h"
|
#include "GL/glut.h"
|
||||||
#include "readtex.h"
|
#include "readtex.h"
|
||||||
#include "extfuncs.h"
|
#include "extfuncs.h"
|
||||||
|
@ -357,6 +358,7 @@ main(int argc, char *argv[])
|
||||||
glutInitWindowSize(500, 400);
|
glutInitWindowSize(500, 400);
|
||||||
glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE);
|
glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE);
|
||||||
glutCreateWindow(Demo);
|
glutCreateWindow(Demo);
|
||||||
|
glewInit();
|
||||||
glutReshapeFunc(Reshape);
|
glutReshapeFunc(Reshape);
|
||||||
glutKeyboardFunc(key);
|
glutKeyboardFunc(key);
|
||||||
glutSpecialFunc(specialkey);
|
glutSpecialFunc(specialkey);
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
#include <GL/glew.h>
|
||||||
#include <GL/gl.h>
|
#include <GL/gl.h>
|
||||||
#include <GL/glut.h>
|
#include <GL/glut.h>
|
||||||
#include <GL/glext.h>
|
#include <GL/glext.h>
|
||||||
|
@ -329,6 +330,7 @@ main(int argc, char *argv[])
|
||||||
glutInitWindowSize(400, 300);
|
glutInitWindowSize(400, 300);
|
||||||
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
|
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
|
||||||
win = glutCreateWindow(argv[0]);
|
win = glutCreateWindow(argv[0]);
|
||||||
|
glewInit();
|
||||||
glutReshapeFunc(Reshape);
|
glutReshapeFunc(Reshape);
|
||||||
glutKeyboardFunc(Key);
|
glutKeyboardFunc(Key);
|
||||||
glutDisplayFunc(Redisplay);
|
glutDisplayFunc(Redisplay);
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
#include <GL/glew.h>
|
||||||
#include <GL/gl.h>
|
#include <GL/gl.h>
|
||||||
#include <GL/glut.h>
|
#include <GL/glut.h>
|
||||||
#include <GL/glext.h>
|
#include <GL/glext.h>
|
||||||
|
@ -266,6 +267,7 @@ main(int argc, char *argv[])
|
||||||
glutInitWindowSize(500, 500);
|
glutInitWindowSize(500, 500);
|
||||||
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
|
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
|
||||||
win = glutCreateWindow(argv[0]);
|
win = glutCreateWindow(argv[0]);
|
||||||
|
glewInit();
|
||||||
glutReshapeFunc(Reshape);
|
glutReshapeFunc(Reshape);
|
||||||
glutKeyboardFunc(Key);
|
glutKeyboardFunc(Key);
|
||||||
glutSpecialFunc(SpecialKey);
|
glutSpecialFunc(SpecialKey);
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
#include <GL/glew.h>
|
||||||
#include <GL/gl.h>
|
#include <GL/gl.h>
|
||||||
#include <GL/glut.h>
|
#include <GL/glut.h>
|
||||||
#include <GL/glext.h>
|
#include <GL/glext.h>
|
||||||
|
@ -359,6 +360,7 @@ main(int argc, char *argv[])
|
||||||
glutInitWindowSize(WinWidth, WinHeight);
|
glutInitWindowSize(WinWidth, WinHeight);
|
||||||
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
|
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
|
||||||
win = glutCreateWindow(argv[0]);
|
win = glutCreateWindow(argv[0]);
|
||||||
|
glewInit();
|
||||||
glutReshapeFunc(Reshape);
|
glutReshapeFunc(Reshape);
|
||||||
glutKeyboardFunc(Key);
|
glutKeyboardFunc(Key);
|
||||||
glutDisplayFunc(Redisplay);
|
glutDisplayFunc(Redisplay);
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <GL/glew.h>
|
||||||
#include "GL/glut.h"
|
#include "GL/glut.h"
|
||||||
#include "readtex.h"
|
#include "readtex.h"
|
||||||
#include "extfuncs.h"
|
#include "extfuncs.h"
|
||||||
|
@ -426,6 +427,7 @@ main(int argc, char *argv[])
|
||||||
glutInitWindowSize(500, 400);
|
glutInitWindowSize(500, 400);
|
||||||
glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE);
|
glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE);
|
||||||
win = glutCreateWindow(Demo);
|
win = glutCreateWindow(Demo);
|
||||||
|
glewInit();
|
||||||
glutReshapeFunc(Reshape);
|
glutReshapeFunc(Reshape);
|
||||||
glutKeyboardFunc(key);
|
glutKeyboardFunc(key);
|
||||||
glutSpecialFunc(specialkey);
|
glutSpecialFunc(specialkey);
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
#include <GL/glew.h>
|
||||||
#include <GL/gl.h>
|
#include <GL/gl.h>
|
||||||
#include <GL/glut.h>
|
#include <GL/glut.h>
|
||||||
#include <GL/glext.h>
|
#include <GL/glext.h>
|
||||||
|
@ -212,6 +213,7 @@ main(int argc, char *argv[])
|
||||||
glutInitWindowSize(400, 400);
|
glutInitWindowSize(400, 400);
|
||||||
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
|
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
|
||||||
win = glutCreateWindow(argv[0]);
|
win = glutCreateWindow(argv[0]);
|
||||||
|
glewInit();
|
||||||
glutReshapeFunc(Reshape);
|
glutReshapeFunc(Reshape);
|
||||||
glutKeyboardFunc(Key);
|
glutKeyboardFunc(Key);
|
||||||
glutSpecialFunc(SpecialKey);
|
glutSpecialFunc(SpecialKey);
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
#include <GL/glew.h>
|
||||||
#include <GL/gl.h>
|
#include <GL/gl.h>
|
||||||
#include <GL/glut.h>
|
#include <GL/glut.h>
|
||||||
#include <GL/glext.h>
|
#include <GL/glext.h>
|
||||||
|
@ -247,6 +248,7 @@ main(int argc, char *argv[])
|
||||||
glutInitWindowSize(WinWidth, WinHeight);
|
glutInitWindowSize(WinWidth, WinHeight);
|
||||||
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
|
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
|
||||||
win = glutCreateWindow(argv[0]);
|
win = glutCreateWindow(argv[0]);
|
||||||
|
glewInit();
|
||||||
glutReshapeFunc(Reshape);
|
glutReshapeFunc(Reshape);
|
||||||
glutKeyboardFunc(Key);
|
glutKeyboardFunc(Key);
|
||||||
glutDisplayFunc(Redisplay);
|
glutDisplayFunc(Redisplay);
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
#include <GL/glew.h>
|
||||||
#include <GL/gl.h>
|
#include <GL/gl.h>
|
||||||
#include <GL/glut.h>
|
#include <GL/glut.h>
|
||||||
#include <GL/glext.h>
|
#include <GL/glext.h>
|
||||||
|
@ -293,6 +294,7 @@ main(int argc, char *argv[])
|
||||||
glutInitWindowSize(WinWidth, WinHeight);
|
glutInitWindowSize(WinWidth, WinHeight);
|
||||||
glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE);
|
glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE);
|
||||||
win = glutCreateWindow(argv[0]);
|
win = glutCreateWindow(argv[0]);
|
||||||
|
glewInit();
|
||||||
glutReshapeFunc(Reshape);
|
glutReshapeFunc(Reshape);
|
||||||
glutKeyboardFunc(Key);
|
glutKeyboardFunc(Key);
|
||||||
glutDisplayFunc(Redisplay);
|
glutDisplayFunc(Redisplay);
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
#include <GL/glew.h>
|
||||||
#include <GL/gl.h>
|
#include <GL/gl.h>
|
||||||
#include <GL/glut.h>
|
#include <GL/glut.h>
|
||||||
#include <GL/glext.h>
|
#include <GL/glext.h>
|
||||||
|
@ -181,6 +182,7 @@ main(int argc, char *argv[])
|
||||||
glutInitWindowSize(400, 200);
|
glutInitWindowSize(400, 200);
|
||||||
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
|
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
|
||||||
Win = glutCreateWindow(argv[0]);
|
Win = glutCreateWindow(argv[0]);
|
||||||
|
glewInit();
|
||||||
glutReshapeFunc(Reshape);
|
glutReshapeFunc(Reshape);
|
||||||
glutKeyboardFunc(Key);
|
glutKeyboardFunc(Key);
|
||||||
glutDisplayFunc(Redisplay);
|
glutDisplayFunc(Redisplay);
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
#include <GL/glew.h>
|
||||||
#include <GL/gl.h>
|
#include <GL/gl.h>
|
||||||
#include <GL/glut.h>
|
#include <GL/glut.h>
|
||||||
#include <GL/glext.h>
|
#include <GL/glext.h>
|
||||||
|
@ -266,6 +267,7 @@ main(int argc, char *argv[])
|
||||||
glutInitWindowSize(500, 500);
|
glutInitWindowSize(500, 500);
|
||||||
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
|
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
|
||||||
win = glutCreateWindow(argv[0]);
|
win = glutCreateWindow(argv[0]);
|
||||||
|
glewInit();
|
||||||
glutReshapeFunc(Reshape);
|
glutReshapeFunc(Reshape);
|
||||||
glutKeyboardFunc(Key);
|
glutKeyboardFunc(Key);
|
||||||
glutSpecialFunc(SpecialKey);
|
glutSpecialFunc(SpecialKey);
|
||||||
|
|
|
@ -40,10 +40,11 @@ def get_dxsdk_root(env):
|
||||||
except KeyError:
|
except KeyError:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def get_dxsdk_paths(env):
|
def generate(env):
|
||||||
dxsdk_root = get_dxsdk_root(env)
|
dxsdk_root = get_dxsdk_root(env)
|
||||||
if dxsdk_root is None:
|
if dxsdk_root is None:
|
||||||
raise SCons.Errors.InternalError, "DirectX SDK not found"
|
# DirectX SDK not found
|
||||||
|
return
|
||||||
|
|
||||||
if env['machine'] in ('generic', 'x86'):
|
if env['machine'] in ('generic', 'x86'):
|
||||||
target_cpu = 'x86'
|
target_cpu = 'x86'
|
||||||
|
@ -57,9 +58,6 @@ def get_dxsdk_paths(env):
|
||||||
env.Prepend(CPPPATH = [os.path.join(dxsdk_root, 'Include')])
|
env.Prepend(CPPPATH = [os.path.join(dxsdk_root, 'Include')])
|
||||||
env.Prepend(LIBPATH = [os.path.join(dxsdk_root, 'Lib', target_cpu)])
|
env.Prepend(LIBPATH = [os.path.join(dxsdk_root, 'Lib', target_cpu)])
|
||||||
|
|
||||||
def generate(env):
|
|
||||||
get_dxsdk_paths(env)
|
|
||||||
|
|
||||||
def exists(env):
|
def exists(env):
|
||||||
return get_dxsdk_root(env) is not None
|
return get_dxsdk_root(env) is not None
|
||||||
|
|
||||||
|
|
|
@ -325,8 +325,10 @@ def generate(env):
|
||||||
if gcc:
|
if gcc:
|
||||||
if debug:
|
if debug:
|
||||||
ccflags += ['-O0', '-g3']
|
ccflags += ['-O0', '-g3']
|
||||||
elif env['toolchain'] == 'crossmingw':
|
elif env['CCVERSION'].startswith('4.2.'):
|
||||||
ccflags += ['-O0', '-g3'] # mingw 4.2.1 optimizer is broken
|
# gcc 4.2.x optimizer is broken
|
||||||
|
print "warning: gcc 4.2.x optimizer is broken -- disabling optimizations"
|
||||||
|
ccflags += ['-O0', '-g3']
|
||||||
else:
|
else:
|
||||||
ccflags += ['-O3', '-g3']
|
ccflags += ['-O3', '-g3']
|
||||||
if env['profile']:
|
if env['profile']:
|
||||||
|
@ -449,11 +451,15 @@ def generate(env):
|
||||||
|
|
||||||
# Linker options
|
# Linker options
|
||||||
linkflags = []
|
linkflags = []
|
||||||
|
shlinkflags = []
|
||||||
if gcc:
|
if gcc:
|
||||||
if env['machine'] == 'x86':
|
if env['machine'] == 'x86':
|
||||||
linkflags += ['-m32']
|
linkflags += ['-m32']
|
||||||
if env['machine'] == 'x86_64':
|
if env['machine'] == 'x86_64':
|
||||||
linkflags += ['-m64']
|
linkflags += ['-m64']
|
||||||
|
shlinkflags += [
|
||||||
|
'-Wl,-Bsymbolic',
|
||||||
|
]
|
||||||
if platform == 'windows' and msvc:
|
if platform == 'windows' and msvc:
|
||||||
# See also:
|
# See also:
|
||||||
# - http://msdn2.microsoft.com/en-us/library/y0zzbyt4.aspx
|
# - http://msdn2.microsoft.com/en-us/library/y0zzbyt4.aspx
|
||||||
|
@ -501,6 +507,7 @@ def generate(env):
|
||||||
'/entry:_DllMainCRTStartup',
|
'/entry:_DllMainCRTStartup',
|
||||||
]
|
]
|
||||||
env.Append(LINKFLAGS = linkflags)
|
env.Append(LINKFLAGS = linkflags)
|
||||||
|
env.Append(SHLINKFLAGS = shlinkflags)
|
||||||
|
|
||||||
# Default libs
|
# Default libs
|
||||||
env.Append(LIBS = [])
|
env.Append(LIBS = [])
|
||||||
|
|
Loading…
Reference in New Issue