diff options
Diffstat (limited to 'progs/tests')
-rw-r--r-- | progs/tests/.gitignore | 3 | ||||
-rw-r--r-- | progs/tests/Makefile | 2 | ||||
-rw-r--r-- | progs/tests/SConscript | 2 | ||||
-rw-r--r-- | progs/tests/arraytexture.c | 1 | ||||
-rw-r--r-- | progs/tests/bufferobj.c | 8 | ||||
-rw-r--r-- | progs/tests/bug_3195.c | 1 | ||||
-rw-r--r-- | progs/tests/cva.c | 1 | ||||
-rw-r--r-- | progs/tests/cylwrap.c | 259 | ||||
-rw-r--r-- | progs/tests/fbotest3.c | 231 | ||||
-rw-r--r-- | progs/tests/getprocaddress.c | 4 | ||||
-rw-r--r-- | progs/tests/interleave.c | 2 | ||||
-rw-r--r-- | progs/tests/mipgen.c | 2 | ||||
-rw-r--r-- | progs/tests/mipmap_comp.c | 2 | ||||
-rw-r--r-- | progs/tests/mipmap_comp_tests.c | 2 | ||||
-rw-r--r-- | progs/tests/mipmap_view.c | 1 | ||||
-rw-r--r-- | progs/tests/no_s3tc.c | 1 | ||||
-rw-r--r-- | progs/tests/streaming_rect.c | 2 | ||||
-rw-r--r-- | progs/tests/texwrap.c | 2 | ||||
-rw-r--r-- | progs/tests/vparray.c | 3 | ||||
-rw-r--r-- | progs/tests/zcomp.c | 1 |
20 files changed, 509 insertions, 21 deletions
diff --git a/progs/tests/.gitignore b/progs/tests/.gitignore index 3479ff8b33..8b3e9f3558 100644 --- a/progs/tests/.gitignore +++ b/progs/tests/.gitignore @@ -13,6 +13,7 @@ arbvptest3 arbvptorus arbvpwarpmesh arraytexture +auxbuffer blendminmax blendsquare blendxor @@ -23,10 +24,12 @@ bug_3195 bug_texstore_i8 bumpmap calibrate_rast +condrender copypixrate crossbar cva drawbuffers +drawbuffers2 extfuncs.h exactrast fbotest1 diff --git a/progs/tests/Makefile b/progs/tests/Makefile index 836396b249..d33415ab05 100644 --- a/progs/tests/Makefile +++ b/progs/tests/Makefile @@ -41,6 +41,7 @@ SOURCES = \ copypixrate.c \ crossbar.c \ cva.c \ + cylwrap.c \ drawbuffers.c \ drawbuffers2.c \ exactrast.c \ @@ -48,6 +49,7 @@ SOURCES = \ floattex.c \ fbotest1.c \ fbotest2.c \ + fbotest3.c \ fillrate.c \ fog.c \ fogcoord.c \ diff --git a/progs/tests/SConscript b/progs/tests/SConscript index e2c6538288..04e4bdf8c2 100644 --- a/progs/tests/SConscript +++ b/progs/tests/SConscript @@ -45,12 +45,14 @@ progs = [ 'copypixrate', 'crossbar', 'cva', + 'cylwrap', 'drawbuffers', 'drawbuffers2', 'exactrast', 'ext422square', 'fbotest1', 'fbotest2', + 'fbotest3', 'fillrate', 'floattex', 'fog', diff --git a/progs/tests/arraytexture.c b/progs/tests/arraytexture.c index 28252a354b..e4e86b9b4c 100644 --- a/progs/tests/arraytexture.c +++ b/progs/tests/arraytexture.c @@ -36,7 +36,6 @@ #include <math.h> #include <GL/glew.h> #include <GL/glut.h> -#include <GL/glext.h> #if !defined(GL_EXT_texture_array) && !defined(GL_MESA_texture_array) # error "This demo requires enums for either GL_EXT_texture_array or GL_MESA_texture_array to build." diff --git a/progs/tests/bufferobj.c b/progs/tests/bufferobj.c index d4ca270016..dc479af045 100644 --- a/progs/tests/bufferobj.c +++ b/progs/tests/bufferobj.c @@ -29,6 +29,7 @@ struct object GLuint VertexStride; GLuint ColorStride; GLuint NumElements; + GLuint MaxElement; }; static struct object Objects[NUM_OBJECTS]; @@ -58,7 +59,8 @@ static void DrawObject( const struct object *obj ) if (obj->NumElements > 0) { /* indexed arrays */ glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, obj->ElementsBufferID); - glDrawElements(GL_LINE_LOOP, obj->NumElements, GL_UNSIGNED_INT, NULL); + glDrawRangeElements(GL_LINE_LOOP, 0, obj->MaxElement, + obj->NumElements, GL_UNSIGNED_INT, NULL); } else { /* non-indexed arrays */ @@ -300,6 +302,7 @@ static void MakeObject1(struct object *obj) obj->VertexStride = 0; obj->ColorStride = 0; obj->NumElements = 0; + obj->MaxElement = 0; glUnmapBufferARB(GL_ARRAY_BUFFER_ARB); @@ -345,6 +348,7 @@ static void MakeObject2(struct object *obj) obj->ColorStride = 6 * sizeof(GLfloat); obj->NumElements = 0; + obj->MaxElement = 0; glUnmapBufferARB(GL_ARRAY_BUFFER_ARB); @@ -401,6 +405,7 @@ static void MakeObject3(struct object *obj) i[3] = 3; glUnmapBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB); obj->NumElements = 4; + obj->MaxElement = 3; if (Have_ARB_vertex_array_object) { CreateVertexArrayObject(obj); @@ -445,6 +450,7 @@ static void MakeObject4(struct object *obj) /* Setup a buffer of indices to test the ELEMENTS path */ obj->ElementsBufferID = 0; obj->NumElements = 0; + obj->MaxElement = 0; if (Have_ARB_vertex_array_object) { CreateVertexArrayObject(obj); diff --git a/progs/tests/bug_3195.c b/progs/tests/bug_3195.c index a075b94e37..3574c1f717 100644 --- a/progs/tests/bug_3195.c +++ b/progs/tests/bug_3195.c @@ -38,7 +38,6 @@ #include <math.h> #include <GL/glew.h> #include <GL/glut.h> -#include <GL/glext.h> #include "readtex.h" diff --git a/progs/tests/cva.c b/progs/tests/cva.c index 02d1dcba2e..b3e041c21e 100644 --- a/progs/tests/cva.c +++ b/progs/tests/cva.c @@ -17,7 +17,6 @@ #define GL_GLEXT_LEGACY #include <GL/glew.h> #include <GL/glut.h> -#include <GL/glext.h> GLfloat verts[][4] = { { -0.5, -0.5, -2.0, 0.0 }, diff --git a/progs/tests/cylwrap.c b/progs/tests/cylwrap.c new file mode 100644 index 0000000000..2b32f11541 --- /dev/null +++ b/progs/tests/cylwrap.c @@ -0,0 +1,259 @@ +/* + * Test cylindrical texcoord wrapping + */ + + +#include <stdio.h> +#include <stdlib.h> +#include <math.h> +#include <GL/glut.h> + +static int Win; +static int WinWidth = 600, WinHeight = 400; +static GLfloat Xrot = 0, Yrot = 0; +static GLboolean CylWrap = GL_TRUE; +static GLboolean Lines = GL_FALSE; + + + +static void +PrintString(const char *s) +{ + while (*s) { + glutBitmapCharacter(GLUT_BITMAP_8_BY_13, (int) *s); + s++; + } +} + + +static void +DrawSample(GLboolean wrap) +{ + float p; + + glEnable(GL_TEXTURE_2D); + + if (Lines) { + /* texured lines */ + float t; + for (t = 0; t <= 1.0; t += 0.125) { + float y = -1.0 + 2.0 * t; + glBegin(GL_LINE_STRIP); + for (p = 0.0; p <= 1.001; p += 0.05) { + float x = -2.0 + p * 4.0; + float s = p + 0.5; + if (wrap && s > 1.0) + s -= 1.0; + glTexCoord2f(s, t); glVertex2f(x, y); + } + glEnd(); + } + } + else { + /* texured quads */ + glBegin(GL_QUAD_STRIP); + for (p = 0.0; p <= 1.001; p += 0.1) { + float x = -2.0 + p * 4.0; + float s = p + 0.5; + if (wrap && s > 1.0) + s -= 1.0; + glTexCoord2f(s, 0); glVertex2f(x, -1); + glTexCoord2f(s, 1); glVertex2f(x, +1); + } + glEnd(); + } + + glDisable(GL_TEXTURE_2D); + + /* hash marks */ + glColor3f(0,0,0); + glBegin(GL_LINES); + for (p = 0.0; p <= 1.001; p += 0.1) { + float x = -2.0 + p * 4.0; + glVertex2f(x, -1.1); + glVertex2f(x, -0.8); + } + glEnd(); + + /* labels */ + glColor3f(1,1,1); + for (p = 0.0; p <= 1.001; p += 0.1) { + char str[100]; + float x = -2.0 + p * 4.0; + float s = p + 0.5; + + if (wrap && s > 1.0) + s -= 1.0; + + sprintf(str, "%3.1f", s); + glRasterPos2f(x, -1.2); + glBitmap(0, 0, 0, 0, -11, 0, NULL); + PrintString(str); + if (p == 0.0) { + glBitmap(0, 0, 0, 0, -55, 0, NULL); + PrintString("s ="); + } + } +} + + +static void +Draw(void) +{ + glClear(GL_COLOR_BUFFER_BIT); + + glPushMatrix(); + glRotatef(Xrot, 1, 0, 0); + glRotatef(Yrot, 0, 1, 0); + + glPushMatrix(); + glTranslatef(0, +1.2, 0); + DrawSample(GL_FALSE); + glPopMatrix(); + + /* set Mesa back-door state for testing cylindrical wrap mode */ + if (CylWrap) + glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_PRIORITY, 0.125); + + glPushMatrix(); + glTranslatef(0, -1.2, 0); + DrawSample(GL_TRUE); + glPopMatrix(); + + glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_PRIORITY, 1.0); + + glPopMatrix(); + + glutSwapBuffers(); +} + + +static void +Reshape(int width, int height) +{ + WinWidth = width; + WinHeight = height; + glViewport(0, 0, width, height); + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + glFrustum(-1.0, 1.0, -1.0, 1.0, 3.0, 25.0); + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + glTranslatef(0.0, 0.0, -10.0); +} + + +static void +Key(unsigned char key, int x, int y) +{ + (void) x; + (void) y; + switch (key) { + case 'c': + case 'C': + CylWrap = !CylWrap; + if (CylWrap) + printf("Cylindrical wrap on.\n"); + else + printf("Cylindrical wrap off.\n"); + break; + case 'l': + case 'L': + Lines = !Lines; + break; + case 27: + glutDestroyWindow(Win); + exit(0); + break; + } + glutPostRedisplay(); +} + + +static void +SpecialKey(int key, int x, int y) +{ + const GLfloat step = 3.0; + (void) x; + (void) y; + switch (key) { + case GLUT_KEY_UP: + Xrot -= step; + break; + case GLUT_KEY_DOWN: + Xrot += step; + break; + case GLUT_KEY_LEFT: + Yrot -= step; + break; + case GLUT_KEY_RIGHT: + Yrot += step; + break; + } + glutPostRedisplay(); +} + + +static void +MakeSineWaveTexture(void) +{ + GLubyte tex[128][512][4]; + int i, j; + + for (j = 0; j < 128; j++) { + for (i = 0; i < 512; i++) { + float x = i / 511.0 * 2.0 * M_PI + M_PI * 0.5; + float y0 = sin(x) * 0.5 + 0.5; + int jy0 = y0 * 128; + float y1 = sin(x + M_PI) * 0.5 + 0.5; + int jy1 = y1 * 128; + if (j < jy0) + tex[j][i][0] = 0xff; + else + tex[j][i][0] = 0; + if (j < jy1) + tex[j][i][1] = 0xff; + else + tex[j][i][1] = 0; + tex[j][i][2] = 0; + tex[j][i][3] = 0xff; + } + } + + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 512, 128, 0, + GL_RGBA, GL_UNSIGNED_BYTE, tex); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); +} + + +static void +Init(void) +{ + glBindTexture(GL_TEXTURE_2D, 5); + MakeSineWaveTexture(); + + glClearColor(0.5, 0.5, 0.5, 0.0); + glPointSize(3.0); + + printf("Press 'c' to toggle cylindrical wrap mode.\n"); + printf("Press 'l' to toggle line / quad drawing.\n"); +} + + +int +main(int argc, char *argv[]) +{ + glutInit(&argc, argv); + glutInitWindowSize(WinWidth, WinHeight); + glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE); + Win = glutCreateWindow(argv[0]); + glutReshapeFunc(Reshape); + glutSpecialFunc(SpecialKey); + glutKeyboardFunc(Key); + glutDisplayFunc(Draw); + Init(); + glutMainLoop(); + return 0; +} diff --git a/progs/tests/fbotest3.c b/progs/tests/fbotest3.c new file mode 100644 index 0000000000..8e288b38b8 --- /dev/null +++ b/progs/tests/fbotest3.c @@ -0,0 +1,231 @@ +/* + * Test GL_EXT_framebuffer_object + * Like fbotest2.c but use a texture for the Z buffer / renderbuffer. + * Note: the Z texture is never resized so that limits what can be + * rendered if the window is resized. + * + * This tests a bug reported by Christoph Bumiller on 1 Feb 2010 + * on mesa3d-dev. + * + * XXX this should be made into a piglit test. + * + * Brian Paul + * 1 Feb 2010 + */ + + +#include <assert.h> +#include <stdio.h> +#include <stdlib.h> +#include <math.h> +#include <GL/glew.h> +#include <GL/glut.h> + + +static int Win = 0; +static int Width = 400, Height = 400; +static GLuint Tex = 0; +static GLuint MyFB, ColorRb, DepthRb; +static GLboolean Animate = GL_FALSE; +static GLfloat Rotation = 0.0; + + +static void +CheckError(int line) +{ + GLenum err = glGetError(); + if (err) { + printf("fbotest3: GL Error 0x%x at line %d\n", (int) err, line); + } +} + + +static void +Display( void ) +{ + GLubyte *buffer = malloc(Width * Height * 4); + GLenum status; + + CheckError(__LINE__); + + /* draw to user framebuffer */ + glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, MyFB); + glDrawBuffer(GL_COLOR_ATTACHMENT1_EXT); + glReadBuffer(GL_COLOR_ATTACHMENT1_EXT); + + status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT); + if (status != GL_FRAMEBUFFER_COMPLETE_EXT) { + printf("fbotest3: Error: Framebuffer is incomplete!!!\n"); + } + + CheckError(__LINE__); + + glClearColor(0.5, 0.5, 1.0, 0.0); + glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); + + glEnable(GL_DEPTH_TEST); + glEnable(GL_LIGHTING); + glEnable(GL_LIGHT0); + + glPushMatrix(); + glRotatef(30.0, 1, 0, 0); + glRotatef(Rotation, 0, 1, 0); + glutSolidTeapot(2.0); + glPopMatrix(); + + /* read from user framebuffer */ + glReadPixels(0, 0, Width, Height, GL_RGBA, GL_UNSIGNED_BYTE, buffer); + + /* draw to window */ + glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); + glDisable(GL_DEPTH_TEST); /* in case window has depth buffer */ + glWindowPos2iARB(0, 0); + glDrawPixels(Width, Height, GL_RGBA, GL_UNSIGNED_BYTE, buffer); + + free(buffer); + glutSwapBuffers(); + CheckError(__LINE__); +} + + +static void +Reshape( int width, int height ) +{ + float ar = (float) width / (float) height; + + glViewport( 0, 0, width, height ); + glMatrixMode( GL_PROJECTION ); + glLoadIdentity(); + glFrustum( -ar, ar, -1.0, 1.0, 5.0, 25.0 ); + + glMatrixMode( GL_MODELVIEW ); + glLoadIdentity(); + glTranslatef( 0.0, 0.0, -15.0 ); + + glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, ColorRb); + glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_RGB, width, height); + + Width = width; + Height = height; +} + + +static void +CleanUp(void) +{ + glDeleteFramebuffersEXT(1, &MyFB); + glDeleteRenderbuffersEXT(1, &ColorRb); + glDeleteRenderbuffersEXT(1, &DepthRb); + glDeleteTextures(1, &Tex); + assert(!glIsFramebufferEXT(MyFB)); + assert(!glIsRenderbufferEXT(ColorRb)); + assert(!glIsRenderbufferEXT(DepthRb)); + glutDestroyWindow(Win); + exit(0); +} + + +static void +Idle(void) +{ + Rotation = glutGet(GLUT_ELAPSED_TIME) * 0.1; + glutPostRedisplay(); +} + + +static void +Key( unsigned char key, int x, int y ) +{ + (void) x; + (void) y; + switch (key) { + case 'a': + Animate = !Animate; + if (Animate) + glutIdleFunc(Idle); + else + glutIdleFunc(NULL); + break; + case 27: + CleanUp(); + break; + } + glutPostRedisplay(); +} + + +static void +Init( void ) +{ + if (!glutExtensionSupported("GL_EXT_framebuffer_object")) { + printf("fbotest3: GL_EXT_framebuffer_object not found!\n"); + exit(0); + } + printf("fbotest3: GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER)); + + /* create initial tex obj as an RGBA texture */ + glGenTextures(1, &Tex); + glBindTexture(GL_TEXTURE_2D, Tex); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 256, 256, 0, + GL_RGBA, GL_UNSIGNED_BYTE, NULL); + glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); + glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); + glEnable(GL_TEXTURE_2D); + + /* draw something to make sure the texture is used */ + glBegin(GL_POINTS); + glVertex2f(0, 0); + glEnd(); + + /* done w/ texturing */ + glDisable(GL_TEXTURE_2D); + + /* Create my Framebuffer Object */ + glGenFramebuffersEXT(1, &MyFB); + glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, MyFB); + assert(glIsFramebufferEXT(MyFB)); + + /* Setup color renderbuffer */ + glGenRenderbuffersEXT(1, &ColorRb); + glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, ColorRb); + assert(glIsRenderbufferEXT(ColorRb)); + glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT1_EXT, + GL_RENDERBUFFER_EXT, ColorRb); + glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_RGB, Width, Height); + + /* Setup depth renderbuffer (a texture) */ + glGenRenderbuffersEXT(1, &DepthRb); + glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, DepthRb); + assert(glIsRenderbufferEXT(DepthRb)); + /* replace RGBA texture with Z texture */ + glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT, Width, Height, 0, + GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, NULL); + glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, + GL_TEXTURE_2D, Tex, 0); + + CheckError(__LINE__); + + /* restore to default */ + glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); + CheckError(__LINE__); +} + + +int +main( int argc, char *argv[] ) +{ + glutInit( &argc, argv ); + glutInitWindowPosition( 0, 0 ); + glutInitWindowSize(Width, Height); + glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE ); + Win = glutCreateWindow(argv[0]); + glewInit(); + glutReshapeFunc( Reshape ); + glutKeyboardFunc( Key ); + glutDisplayFunc( Display ); + if (Animate) + glutIdleFunc(Idle); + Init(); + glutMainLoop(); + return 0; +} diff --git a/progs/tests/getprocaddress.c b/progs/tests/getprocaddress.c index e699baf44b..38ca7000df 100644 --- a/progs/tests/getprocaddress.c +++ b/progs/tests/getprocaddress.c @@ -660,8 +660,8 @@ exercise_CompressedTextures(GLenum dimension) glGetTexLevelParameteriv(dimension, 0, GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB, &queryCompressedSize); if (queryCompressedSize != sizeof(compressedTexture)) { - fprintf(stderr, "%s: compressed 3D texture changed size: expected %d, actual %d\n", - __FUNCTION__, sizeof(compressedTexture), queryCompressedSize); + fprintf(stderr, "%s: compressed 3D texture changed size: expected %lu, actual %d\n", + __FUNCTION__, (unsigned long) sizeof(compressedTexture), queryCompressedSize); return GL_FALSE; } (*GetCompressedTexImageARB)(dimension, 0, queryCompressedData); diff --git a/progs/tests/interleave.c b/progs/tests/interleave.c index 47bf9dfbe5..acf67d02c1 100644 --- a/progs/tests/interleave.c +++ b/progs/tests/interleave.c @@ -105,7 +105,7 @@ static const unsigned indicies[12] = { 1, 4, 2 }; -#define NONE { NULL, 0, 0, 0 } +#define NONE { NULL, 0, 0, 0, sizeof( NULL ) } #define V2F { v, 2, 2 * sizeof( GLfloat ), GL_FLOAT, sizeof( v[0] ) } #define V3F { v, 3, 3 * sizeof( GLfloat ), GL_FLOAT, sizeof( v[0] ) } #define V4F { v, 4, 4 * sizeof( GLfloat ), GL_FLOAT, sizeof( v[0] ) } diff --git a/progs/tests/mipgen.c b/progs/tests/mipgen.c index 088f643215..48e52c9c31 100644 --- a/progs/tests/mipgen.c +++ b/progs/tests/mipgen.c @@ -48,8 +48,6 @@ #include <GL/glew.h> #include <GL/glut.h> -#include "readtex.h" - static GLfloat LodBias = 6.0; /* make smallest miplevel visible */ static GLuint texImage; diff --git a/progs/tests/mipmap_comp.c b/progs/tests/mipmap_comp.c index dd2232113b..122d157949 100644 --- a/progs/tests/mipmap_comp.c +++ b/progs/tests/mipmap_comp.c @@ -48,8 +48,6 @@ #include <GL/glew.h> #include <GL/glut.h> -#include "readtex.h" - #define SIZE 16 /* not larger then 16 */ static GLint BaseLevel = 0, MaxLevel = 9; diff --git a/progs/tests/mipmap_comp_tests.c b/progs/tests/mipmap_comp_tests.c index e865b30ad0..b93a5c6139 100644 --- a/progs/tests/mipmap_comp_tests.c +++ b/progs/tests/mipmap_comp_tests.c @@ -48,8 +48,6 @@ #include <GL/glew.h> #include <GL/glut.h> -#include "readtex.h" - #define SIZE 16 /* not larger then 16 */ static GLint BaseLevel = 0, MaxLevel ; diff --git a/progs/tests/mipmap_view.c b/progs/tests/mipmap_view.c index 808d348699..eb52197052 100644 --- a/progs/tests/mipmap_view.c +++ b/progs/tests/mipmap_view.c @@ -12,7 +12,6 @@ #include <math.h> #include <GL/glew.h> #include <GL/glut.h> -#include <GL/glext.h> #include "readtex.h" diff --git a/progs/tests/no_s3tc.c b/progs/tests/no_s3tc.c index 31cfb40b9d..c4132cd956 100644 --- a/progs/tests/no_s3tc.c +++ b/progs/tests/no_s3tc.c @@ -40,7 +40,6 @@ #include <string.h> #include <GL/glew.h> #include <GL/glut.h> -#include <GL/glext.h> static unsigned data[16]; diff --git a/progs/tests/streaming_rect.c b/progs/tests/streaming_rect.c index f65ac4ce36..3b016e55af 100644 --- a/progs/tests/streaming_rect.c +++ b/progs/tests/streaming_rect.c @@ -13,8 +13,6 @@ #include <GL/glew.h> #include <GL/glut.h> -#include "readtex.h" - #define ANIMATE 10 #define PBO 11 diff --git a/progs/tests/texwrap.c b/progs/tests/texwrap.c index 92c8a2f14c..39c55919dd 100644 --- a/progs/tests/texwrap.c +++ b/progs/tests/texwrap.c @@ -71,7 +71,7 @@ static struct wrap_mode modes[] = { WRAP_EXT ( GL_MIRROR_CLAMP_TO_EDGE_EXT, "GL_ATI_texture_mirror_once", "GL_EXT_texture_mirror_clamp", 999.0 ), - { 0 } + { 0, NULL, GL_FALSE, 0.0, { NULL, NULL } } }; static void diff --git a/progs/tests/vparray.c b/progs/tests/vparray.c index fe168c6cd5..75160afd46 100644 --- a/progs/tests/vparray.c +++ b/progs/tests/vparray.c @@ -8,7 +8,6 @@ #include <assert.h> #include <stdio.h> -#include <string.h> #include <stdlib.h> #include <string.h> #include <math.h> @@ -183,7 +182,7 @@ static void init_program(void) static const GLfloat bias[4] = {1.0, 1.0, 1.0, 0.0}; if (!glutExtensionSupported("GL_NV_vertex_program")) { - printf("Sorry, this program requires GL_NV_vertex_program"); + printf("Sorry, this program requires GL_NV_vertex_program\n"); exit(1); } diff --git a/progs/tests/zcomp.c b/progs/tests/zcomp.c index 15e35f17b0..d6b9c07022 100644 --- a/progs/tests/zcomp.c +++ b/progs/tests/zcomp.c @@ -7,7 +7,6 @@ #include <math.h> #include <GL/glew.h> #include <GL/glut.h> -#include "../util/showbuffer.c" static int Win; |