diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2009-07-15 14:17:07 -0400 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2009-07-15 14:17:07 -0400 |
commit | c5c19919ce627b98d8aab4284da1694573bcccd4 (patch) | |
tree | 2e29b313b79b6a392e020fd5723e3cc00c800fd2 /progs/glsl | |
parent | a0d4a12614fce072fa1eb5516e626909171c95e1 (diff) | |
parent | 3a3b83e5112b725e22f05b32a273a2351b820944 (diff) |
Merge branch 'master' of git+ssh://agd5f@git.freedesktop.org/git/mesa/mesa into r6xx-rewrite
This builds, but I get an assertion in radeonGetLock() due to
the drawable being null.
Diffstat (limited to 'progs/glsl')
-rw-r--r-- | progs/glsl/Makefile | 2 | ||||
-rw-r--r-- | progs/glsl/SConscript | 55 | ||||
-rw-r--r-- | progs/glsl/array.c | 3 | ||||
-rw-r--r-- | progs/glsl/bitmap.c | 2 | ||||
-rw-r--r-- | progs/glsl/brick.c | 2 | ||||
-rw-r--r-- | progs/glsl/bump.c | 1 | ||||
-rw-r--r-- | progs/glsl/convolutions.c | 3 | ||||
-rw-r--r-- | progs/glsl/deriv.c | 2 | ||||
-rw-r--r-- | progs/glsl/fragcoord.c | 2 | ||||
-rw-r--r-- | progs/glsl/identity.c | 2 | ||||
-rw-r--r-- | progs/glsl/linktest.c | 2 | ||||
-rw-r--r-- | progs/glsl/mandelbrot.c | 2 | ||||
-rw-r--r-- | progs/glsl/multinoise.c | 2 | ||||
-rw-r--r-- | progs/glsl/multitex.c | 6 | ||||
-rw-r--r-- | progs/glsl/noise.c | 2 | ||||
-rw-r--r-- | progs/glsl/pointcoord.c | 2 | ||||
-rw-r--r-- | progs/glsl/points.c | 2 | ||||
-rw-r--r-- | progs/glsl/reflect.vert | 1 | ||||
-rw-r--r-- | progs/glsl/samplers.c | 2 | ||||
-rw-r--r-- | progs/glsl/shadow_sampler.c | 2 | ||||
-rw-r--r-- | progs/glsl/skinning.c | 2 | ||||
-rw-r--r-- | progs/glsl/texaaline.c | 2 | ||||
-rw-r--r-- | progs/glsl/texdemo1.c | 2 | ||||
-rw-r--r-- | progs/glsl/toyball.c | 2 | ||||
-rw-r--r-- | progs/glsl/trirast.c | 2 | ||||
-rw-r--r-- | progs/glsl/twoside.c | 2 | ||||
-rw-r--r-- | progs/glsl/vert-or-frag-only.c | 2 | ||||
-rw-r--r-- | progs/glsl/vert-tex.c | 2 |
28 files changed, 109 insertions, 4 deletions
diff --git a/progs/glsl/Makefile b/progs/glsl/Makefile index f97cdb6942..eedd866c95 100644 --- a/progs/glsl/Makefile +++ b/progs/glsl/Makefile @@ -10,7 +10,7 @@ LIB_DEP = \ $(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME) \ $(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME) -LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS) +LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLEW_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS) INCLUDE_DIRS = -I$(TOP)/progs/util diff --git a/progs/glsl/SConscript b/progs/glsl/SConscript new file mode 100644 index 0000000000..7a4549cd70 --- /dev/null +++ b/progs/glsl/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', + ) + diff --git a/progs/glsl/array.c b/progs/glsl/array.c index 46ef8043bc..6da15b2fcc 100644 --- a/progs/glsl/array.c +++ b/progs/glsl/array.c @@ -9,9 +9,9 @@ #include <stdio.h> #include <stdlib.h> #include <math.h> +#include <GL/glew.h> #include <GL/gl.h> #include <GL/glut.h> -#include <GL/glext.h> #include "extfuncs.h" #include "shaderutil.h" @@ -248,6 +248,7 @@ main(int argc, char *argv[]) glutInitWindowSize(500, 500); glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH); win = glutCreateWindow(argv[0]); + glewInit(); glutReshapeFunc(Reshape); glutKeyboardFunc(Key); glutSpecialFunc(SpecialKey); diff --git a/progs/glsl/bitmap.c b/progs/glsl/bitmap.c index d488ec6cb9..08fac15c89 100644 --- a/progs/glsl/bitmap.c +++ b/progs/glsl/bitmap.c @@ -9,6 +9,7 @@ #include <stdio.h> #include <stdlib.h> #include <math.h> +#include <GL/glew.h> #include <GL/gl.h> #include <GL/glut.h> #include <GL/glext.h> @@ -309,6 +310,7 @@ main(int argc, char *argv[]) glutInitWindowSize(WinWidth, WinHeight); glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH); Win = glutCreateWindow(argv[0]); + glewInit(); glutReshapeFunc(Reshape); glutKeyboardFunc(Key); glutSpecialFunc(SpecialKey); diff --git a/progs/glsl/brick.c b/progs/glsl/brick.c index 526ef0e2e3..607acd0597 100644 --- a/progs/glsl/brick.c +++ b/progs/glsl/brick.c @@ -9,6 +9,7 @@ #include <stdio.h> #include <stdlib.h> #include <math.h> +#include <GL/glew.h> #include <GL/gl.h> #include <GL/glut.h> #include <GL/glext.h> @@ -191,6 +192,7 @@ main(int argc, char *argv[]) glutInitWindowSize(400, 400); glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH); win = glutCreateWindow(argv[0]); + glewInit(); glutReshapeFunc(Reshape); glutKeyboardFunc(Key); glutSpecialFunc(SpecialKey); diff --git a/progs/glsl/bump.c b/progs/glsl/bump.c index 0ea1f8331f..c401e590f7 100644 --- a/progs/glsl/bump.c +++ b/progs/glsl/bump.c @@ -288,6 +288,7 @@ main(int argc, char *argv[]) glutInitWindowSize(400, 400); glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH); win = glutCreateWindow(argv[0]); + glewInit(); glutReshapeFunc(Reshape); glutKeyboardFunc(Key); glutSpecialFunc(SpecialKey); diff --git a/progs/glsl/convolutions.c b/progs/glsl/convolutions.c index ac71c68235..22ce7edcdc 100644 --- a/progs/glsl/convolutions.c +++ b/progs/glsl/convolutions.c @@ -5,6 +5,8 @@ * Author: Zack Rusin */ +#include <GL/glew.h> + #define GL_GLEXT_PROTOTYPES #include "readtex.h" @@ -455,6 +457,7 @@ int main(int argc, char **argv) exit(1); } + glewInit(); init(); glutReshapeFunc(reshape); diff --git a/progs/glsl/deriv.c b/progs/glsl/deriv.c index e69f0b82c4..3fd674c331 100644 --- a/progs/glsl/deriv.c +++ b/progs/glsl/deriv.c @@ -13,6 +13,7 @@ #include <stdio.h> #include <stdlib.h> #include <math.h> +#include <GL/glew.h> #include <GL/gl.h> #include <GL/glut.h> #include <GL/glext.h> @@ -228,6 +229,7 @@ main(int argc, char *argv[]) glutInitWindowSize(200, 200); glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH); win = glutCreateWindow(argv[0]); + glewInit(); glutReshapeFunc(Reshape); glutKeyboardFunc(Key); glutSpecialFunc(SpecialKey); diff --git a/progs/glsl/fragcoord.c b/progs/glsl/fragcoord.c index 0b7561f3e4..509ad47e7f 100644 --- a/progs/glsl/fragcoord.c +++ b/progs/glsl/fragcoord.c @@ -12,6 +12,7 @@ #include <stdio.h> #include <stdlib.h> #include <math.h> +#include <GL/glew.h> #include <GL/gl.h> #include <GL/glut.h> #include <GL/glext.h> @@ -174,6 +175,7 @@ main(int argc, char *argv[]) glutInitWindowSize(WinWidth, WinHeight); glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE); win = glutCreateWindow(argv[0]); + glewInit(); glutReshapeFunc(Reshape); glutKeyboardFunc(Key); glutDisplayFunc(Redisplay); diff --git a/progs/glsl/identity.c b/progs/glsl/identity.c index 37579eb346..5ba7468cc4 100644 --- a/progs/glsl/identity.c +++ b/progs/glsl/identity.c @@ -9,6 +9,7 @@ #include <stdio.h> #include <stdlib.h> #include <math.h> +#include <GL/glew.h> #include <GL/gl.h> #include <GL/glut.h> #include <GL/glext.h> @@ -195,6 +196,7 @@ main(int argc, char *argv[]) glutInitWindowSize(200, 200); glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH); win = glutCreateWindow(argv[0]); + glewInit(); glutReshapeFunc(Reshape); glutKeyboardFunc(Key); glutSpecialFunc(SpecialKey); diff --git a/progs/glsl/linktest.c b/progs/glsl/linktest.c index 988d082341..fe5d1564e0 100644 --- a/progs/glsl/linktest.c +++ b/progs/glsl/linktest.c @@ -9,6 +9,7 @@ #include <stdio.h> #include <stdlib.h> #include <math.h> +#include <GL/glew.h> #include <GL/gl.h> #include <GL/glut.h> #include <GL/glext.h> @@ -245,6 +246,7 @@ main(int argc, char *argv[]) glutInitWindowSize(300, 300); glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH); Win = glutCreateWindow(argv[0]); + glewInit(); glutReshapeFunc(Reshape); glutKeyboardFunc(Key); glutDisplayFunc(Redisplay); diff --git a/progs/glsl/mandelbrot.c b/progs/glsl/mandelbrot.c index 24e1992665..eeea4eb52a 100644 --- a/progs/glsl/mandelbrot.c +++ b/progs/glsl/mandelbrot.c @@ -9,6 +9,7 @@ #include <stdio.h> #include <stdlib.h> #include <math.h> +#include <GL/glew.h> #include <GL/gl.h> #include <GL/glut.h> #include <GL/glext.h> @@ -206,6 +207,7 @@ main(int argc, char *argv[]) glutInitWindowSize(400, 400); glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH); win = glutCreateWindow(argv[0]); + glewInit(); glutReshapeFunc(Reshape); glutKeyboardFunc(Key); glutSpecialFunc(SpecialKey); diff --git a/progs/glsl/multinoise.c b/progs/glsl/multinoise.c index 2351863aff..400511508e 100644 --- a/progs/glsl/multinoise.c +++ b/progs/glsl/multinoise.c @@ -8,6 +8,7 @@ #include <stdio.h> #include <stdlib.h> #include <math.h> +#include <GL/glew.h> #include <GL/gl.h> #include <GL/glut.h> #include <GL/glext.h> @@ -270,6 +271,7 @@ main(int argc, char *argv[]) glutInitWindowSize(400, 400); glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH); win = glutCreateWindow(argv[0]); + glewInit(); glutReshapeFunc(Reshape); glutKeyboardFunc(Key); glutSpecialFunc(SpecialKey); diff --git a/progs/glsl/multitex.c b/progs/glsl/multitex.c index 1a1c63aaf4..c6e0b10b49 100644 --- a/progs/glsl/multitex.c +++ b/progs/glsl/multitex.c @@ -28,6 +28,7 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <GL/glew.h> #include "GL/glut.h" #include "readtex.h" #include "extfuncs.h" @@ -139,7 +140,7 @@ DrawPolygonArray(void) } else { glVertexPointer(2, GL_FLOAT, 0, vertPtr); - glEnable(GL_VERTEX_ARRAY); + glEnableClientState(GL_VERTEX_ARRAY); } glVertexAttribPointer_func(TexCoord0_attr, 2, GL_FLOAT, GL_FALSE, @@ -152,7 +153,7 @@ DrawPolygonArray(void) glDrawArrays(GL_TRIANGLE_FAN, 0, 4); - glBindBufferARB_func(GL_ARRAY_BUFFER_ARB, 0); + glBindBufferARB_func(GL_ARRAY_BUFFER_ARB, 0); } @@ -400,6 +401,7 @@ main(int argc, char *argv[]) glutInitWindowSize(500, 400); glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE); glutCreateWindow(Demo); + glewInit(); glutReshapeFunc(Reshape); glutKeyboardFunc(key); glutSpecialFunc(specialkey); diff --git a/progs/glsl/noise.c b/progs/glsl/noise.c index bd8f50036b..83e4696fc9 100644 --- a/progs/glsl/noise.c +++ b/progs/glsl/noise.c @@ -8,6 +8,7 @@ #include <stdio.h> #include <stdlib.h> #include <math.h> +#include <GL/glew.h> #include <GL/gl.h> #include <GL/glut.h> #include <GL/glext.h> @@ -207,6 +208,7 @@ main(int argc, char *argv[]) glutInitWindowSize(400, 400); glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH); win = glutCreateWindow(argv[0]); + glewInit(); glutReshapeFunc(Reshape); glutKeyboardFunc(Key); glutSpecialFunc(SpecialKey); diff --git a/progs/glsl/pointcoord.c b/progs/glsl/pointcoord.c index b240077c25..aa01e2166d 100644 --- a/progs/glsl/pointcoord.c +++ b/progs/glsl/pointcoord.c @@ -10,6 +10,7 @@ #include <stdio.h> #include <stdlib.h> #include <math.h> +#include <GL/glew.h> #include <GL/gl.h> #include <GL/glut.h> #include <GL/glext.h> @@ -195,6 +196,7 @@ main(int argc, char *argv[]) glutInitWindowSize(WinWidth, WinHeight); glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE); win = glutCreateWindow(argv[0]); + glewInit(); glutReshapeFunc(Reshape); glutKeyboardFunc(Key); glutDisplayFunc(Redisplay); diff --git a/progs/glsl/points.c b/progs/glsl/points.c index 392dc4db85..1b346228aa 100644 --- a/progs/glsl/points.c +++ b/progs/glsl/points.c @@ -10,6 +10,7 @@ #include <stdio.h> #include <stdlib.h> #include <math.h> +#include <GL/glew.h> #include <GL/gl.h> #include <GL/glut.h> #include <GL/glext.h> @@ -248,6 +249,7 @@ main(int argc, char *argv[]) glutInitWindowSize(WinWidth, WinHeight); glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH); Win = glutCreateWindow(argv[0]); + glewInit(); glutReshapeFunc(Reshape); glutKeyboardFunc(Key); glutSpecialFunc(SpecialKey); diff --git a/progs/glsl/reflect.vert b/progs/glsl/reflect.vert index 402be38bf7..e1f22def33 100644 --- a/progs/glsl/reflect.vert +++ b/progs/glsl/reflect.vert @@ -11,6 +11,7 @@ void main() float two_n_dot_u = 2.0 * dot(n, u); vec4 f; f.xyz = u - n * two_n_dot_u; + f.w = 1.0; // outputs normal = n; diff --git a/progs/glsl/samplers.c b/progs/glsl/samplers.c index 3fb8577d5e..cbb264dad1 100644 --- a/progs/glsl/samplers.c +++ b/progs/glsl/samplers.c @@ -39,6 +39,7 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <GL/glew.h> #include "GL/glut.h" #include "readtex.h" #include "extfuncs.h" @@ -357,6 +358,7 @@ main(int argc, char *argv[]) glutInitWindowSize(500, 400); glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE); glutCreateWindow(Demo); + glewInit(); glutReshapeFunc(Reshape); glutKeyboardFunc(key); glutSpecialFunc(specialkey); diff --git a/progs/glsl/shadow_sampler.c b/progs/glsl/shadow_sampler.c index 2902b53552..673ad465ad 100644 --- a/progs/glsl/shadow_sampler.c +++ b/progs/glsl/shadow_sampler.c @@ -10,6 +10,7 @@ #include <stdio.h> #include <stdlib.h> #include <math.h> +#include <GL/glew.h> #include <GL/gl.h> #include <GL/glut.h> #include <GL/glext.h> @@ -329,6 +330,7 @@ main(int argc, char *argv[]) glutInitWindowSize(400, 300); glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE); win = glutCreateWindow(argv[0]); + glewInit(); glutReshapeFunc(Reshape); glutKeyboardFunc(Key); glutDisplayFunc(Redisplay); diff --git a/progs/glsl/skinning.c b/progs/glsl/skinning.c index 8a65d0667c..d7b968fed0 100644 --- a/progs/glsl/skinning.c +++ b/progs/glsl/skinning.c @@ -12,6 +12,7 @@ #include <stdio.h> #include <stdlib.h> #include <math.h> +#include <GL/glew.h> #include <GL/gl.h> #include <GL/glut.h> #include <GL/glext.h> @@ -266,6 +267,7 @@ main(int argc, char *argv[]) glutInitWindowSize(500, 500); glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH); win = glutCreateWindow(argv[0]); + glewInit(); glutReshapeFunc(Reshape); glutKeyboardFunc(Key); glutSpecialFunc(SpecialKey); diff --git a/progs/glsl/texaaline.c b/progs/glsl/texaaline.c index 0b3cc84958..6720941a6e 100644 --- a/progs/glsl/texaaline.c +++ b/progs/glsl/texaaline.c @@ -11,6 +11,7 @@ #include <stdio.h> #include <stdlib.h> #include <math.h> +#include <GL/glew.h> #include <GL/gl.h> #include <GL/glut.h> #include <GL/glext.h> @@ -359,6 +360,7 @@ main(int argc, char *argv[]) glutInitWindowSize(WinWidth, WinHeight); glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE); win = glutCreateWindow(argv[0]); + glewInit(); glutReshapeFunc(Reshape); glutKeyboardFunc(Key); glutDisplayFunc(Redisplay); diff --git a/progs/glsl/texdemo1.c b/progs/glsl/texdemo1.c index 96ddca1f32..08a87a5152 100644 --- a/progs/glsl/texdemo1.c +++ b/progs/glsl/texdemo1.c @@ -28,6 +28,7 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <GL/glew.h> #include "GL/glut.h" #include "readtex.h" #include "extfuncs.h" @@ -426,6 +427,7 @@ main(int argc, char *argv[]) glutInitWindowSize(500, 400); glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE); win = glutCreateWindow(Demo); + glewInit(); glutReshapeFunc(Reshape); glutKeyboardFunc(key); glutSpecialFunc(specialkey); diff --git a/progs/glsl/toyball.c b/progs/glsl/toyball.c index 37ad6bf291..2b644acb6d 100644 --- a/progs/glsl/toyball.c +++ b/progs/glsl/toyball.c @@ -9,6 +9,7 @@ #include <stdio.h> #include <stdlib.h> #include <math.h> +#include <GL/glew.h> #include <GL/gl.h> #include <GL/glut.h> #include <GL/glext.h> @@ -212,6 +213,7 @@ main(int argc, char *argv[]) glutInitWindowSize(400, 400); glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH); win = glutCreateWindow(argv[0]); + glewInit(); glutReshapeFunc(Reshape); glutKeyboardFunc(Key); glutSpecialFunc(SpecialKey); diff --git a/progs/glsl/trirast.c b/progs/glsl/trirast.c index 89df64fc71..3d4decaa2f 100644 --- a/progs/glsl/trirast.c +++ b/progs/glsl/trirast.c @@ -15,6 +15,7 @@ #include <stdio.h> #include <stdlib.h> #include <math.h> +#include <GL/glew.h> #include <GL/gl.h> #include <GL/glut.h> #include <GL/glext.h> @@ -247,6 +248,7 @@ main(int argc, char *argv[]) glutInitWindowSize(WinWidth, WinHeight); glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH); win = glutCreateWindow(argv[0]); + glewInit(); glutReshapeFunc(Reshape); glutKeyboardFunc(Key); glutDisplayFunc(Redisplay); diff --git a/progs/glsl/twoside.c b/progs/glsl/twoside.c index 06488bd175..9ebc4ec360 100644 --- a/progs/glsl/twoside.c +++ b/progs/glsl/twoside.c @@ -12,6 +12,7 @@ #include <stdio.h> #include <stdlib.h> #include <math.h> +#include <GL/glew.h> #include <GL/gl.h> #include <GL/glut.h> #include <GL/glext.h> @@ -293,6 +294,7 @@ main(int argc, char *argv[]) glutInitWindowSize(WinWidth, WinHeight); glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE); win = glutCreateWindow(argv[0]); + glewInit(); glutReshapeFunc(Reshape); glutKeyboardFunc(Key); glutDisplayFunc(Redisplay); diff --git a/progs/glsl/vert-or-frag-only.c b/progs/glsl/vert-or-frag-only.c index f6eedd8327..8e1612aca4 100644 --- a/progs/glsl/vert-or-frag-only.c +++ b/progs/glsl/vert-or-frag-only.c @@ -11,6 +11,7 @@ #include <stdio.h> #include <stdlib.h> #include <math.h> +#include <GL/glew.h> #include <GL/gl.h> #include <GL/glut.h> #include <GL/glext.h> @@ -181,6 +182,7 @@ main(int argc, char *argv[]) glutInitWindowSize(400, 200); glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH); Win = glutCreateWindow(argv[0]); + glewInit(); glutReshapeFunc(Reshape); glutKeyboardFunc(Key); glutDisplayFunc(Redisplay); diff --git a/progs/glsl/vert-tex.c b/progs/glsl/vert-tex.c index 9d00a61054..b74bf50679 100644 --- a/progs/glsl/vert-tex.c +++ b/progs/glsl/vert-tex.c @@ -9,6 +9,7 @@ #include <stdio.h> #include <stdlib.h> #include <math.h> +#include <GL/glew.h> #include <GL/gl.h> #include <GL/glut.h> #include <GL/glext.h> @@ -266,6 +267,7 @@ main(int argc, char *argv[]) glutInitWindowSize(500, 500); glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH); win = glutCreateWindow(argv[0]); + glewInit(); glutReshapeFunc(Reshape); glutKeyboardFunc(Key); glutSpecialFunc(SpecialKey); |