Commit c9eafa83 authored by Eric Anholt's avatar Eric Anholt

Replace the copy-and-pasted header setup with consistent use of piglit-util.h.

parent dc1d9ed1
......@@ -21,17 +21,8 @@
* DEALINGS IN THE SOFTWARE.
*/
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <GL/glew.h>
#if defined(__APPLE__)
#include <GLUT/glut.h>
#else
#include <GL/glut.h>
#endif
#include "piglit-util.h"
#ifndef TRUE
......
......@@ -6,20 +6,8 @@
* This bug existed in the R300 driver and was triggered by Sauerbraten.
*/
#include <assert.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#if defined(__APPLE__)
#include <GLUT/glut.h>
#else
#include "GL/glut.h"
#endif
#include "piglit-util.h"
static int Width = 100, Height = 100;
static void Display(void)
......
......@@ -7,17 +7,6 @@
* This bug was originally triggered by Glest.
*/
#include <assert.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#if defined(__APPLE__)
#include <GLUT/glut.h>
#else
#include "GL/glut.h"
#endif
#include "piglit-util.h"
......
......@@ -3,14 +3,7 @@
* http://bugs.freedesktop.org/show_bug.cgi?id=10370
*/
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#if defined(__APPLE__)
#include <GLUT/glut.h>
#else
#include "GL/glut.h"
#endif
#include "piglit-util.h"
static int Automatic = 0;
......
......@@ -30,19 +30,7 @@
*
* Tests that the driver doesn't fail when deleting a mapped buffer object.
*/
#define GL_GLEXT_PROTOTYPES
#include <assert.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <GL/glew.h>
#if defined(__APPLE__)
#include <GLUT/glut.h>
#else
#include "GL/glut.h"
#endif
#include "piglit-util.h"
static int Automatic = 0;
......
......@@ -34,16 +34,6 @@
* passes.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <GL/glew.h>
#if defined(__APPLE__)
#include <GLUT/glut.h>
#else
#include <GL/glut.h>
#endif
#include "piglit-util.h"
static int Automatic = 0;
......
......@@ -23,17 +23,6 @@
// author: Ben Holmes
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <GL/glew.h>
#if defined(__APPLE__)
#include <GLUT/glut.h>
#else
#include <GL/glut.h>
#endif
#include "piglit-util.h"
static GLboolean Automatic = GL_FALSE;
......
......@@ -3,14 +3,6 @@
* http://bugs.freedesktop.org/show_bug.cgi?id=23489
*/
#include <string.h>
#if defined(__APPLE__)
#include <GLUT/glut.h>
#else
#include <GL/glut.h>
#endif
#include "piglit-util.h"
static int Automatic = 0;
......
......@@ -24,16 +24,6 @@
* Shuang he <shuang.he@intel.com>
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <GL/glew.h>
#if defined(__APPLE__)
#include <GLUT/glut.h>
#else
#include <GL/glut.h>
#endif
#include "piglit-util.h"
#define WIN_WIDTH 100
......
......@@ -32,16 +32,6 @@
* before a fragment program has been setup.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <GL/glew.h>
#if defined(__APPLE__)
#include <GLUT/glut.h>
#else
#include <GL/glut.h>
#endif
#include "piglit-util.h"
#include "piglit-framework.h"
......
......@@ -3,14 +3,7 @@
* https://bugs.freedesktop.org/show_bug.cgi?id=9833
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#if defined(__APPLE__)
#include <GLUT/glut.h>
#else
#include <GL/glut.h>
#endif
#include "piglit-util.h"
static int Automatic = 0;
......
......@@ -28,16 +28,6 @@
* \author Ben Holmes
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <GL/glew.h>
#if defined(__APPLE__)
#include <GLUT/glut.h>
#else
#include <GL/glut.h>
#endif
#include "piglit-util.h"
static GLboolean Automatic = GL_FALSE;
......
......@@ -15,20 +15,8 @@
* so this test is always automatic.
*/
#include <assert.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#if defined(__APPLE__)
#include <GLUT/glut.h>
#else
#include "GL/glut.h"
#endif
#include "piglit-util.h"
static int Width = 100, Height = 100;
static GLfloat colors[8][3] = {
......
......@@ -30,20 +30,8 @@
* 2D textures, which caused incorrect sampling of border colors.
*/
#include <assert.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#if defined(__APPLE__)
#include <GLUT/glut.h>
#else
#include <GL/glut.h>
#endif
#include "piglit-util.h"
static int Width = 256, Height = 128;
static int Automatic = 0;
......
......@@ -31,19 +31,6 @@
* succeeds.
*/
#include <assert.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#define GL_GLEXT_PROTOTYPES
#include <GL/glew.h>
#if defined(__APPLE__)
#include <GLUT/glut.h>
#else
#include "GL/glut.h"
#endif
#include "piglit-util.h"
#define BUF_WIDTH 32
......
......@@ -31,18 +31,6 @@
* of those inidivual depths to the window system framebuffer succeeds.
*/
#include <assert.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#define GL_GLEXT_PROTOTYPES
#include <GL/glew.h>
#if defined(__APPLE__)
#include <GLUT/glut.h>
#else
#include "GL/glut.h"
#endif
#include "piglit-util.h"
#define BUF_WIDTH 32
......
......@@ -31,18 +31,6 @@
* of those faces to the window system framebuffer succeeds.
*/
#include <assert.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#define GL_GLEXT_PROTOTYPES
#include <GL/glew.h>
#if defined(__APPLE__)
#include <GLUT/glut.h>
#else
#include "GL/glut.h"
#endif
#include "piglit-util.h"
#define BUF_WIDTH 32
......
......@@ -30,18 +30,6 @@
* Tests that glGenerateMipmapEXT works correctly on a 2D texture.
*/
#include <assert.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#define GL_GLEXT_PROTOTYPES
#include <GL/glew.h>
#if defined(__APPLE__)
#include <GLUT/glut.h>
#else
#include "GL/glut.h"
#endif
#include "piglit-util.h"
#define TEX_WIDTH 256
......
......@@ -31,18 +31,6 @@
* glReadPixels() versus glClear and immediate mode rendering.
*/
#include <assert.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#define GL_GLEXT_PROTOTYPES
#include <GL/glew.h>
#if defined(__APPLE__)
#include <GLUT/glut.h>
#else
#include "GL/glut.h"
#endif
#include "piglit-util.h"
#define BUF_WIDTH 32
......
......@@ -30,19 +30,8 @@
* with alpha blending.
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <GL/glew.h>
#if defined(__APPLE__)
#include <GLUT/glut.h>
#else
#include <GL/glut.h>
#endif
#include "piglit-util.h"
static GLboolean Automatic = GL_FALSE;
static GLfloat verts[12] = {225.0, 175.0, 0.0,
......
......@@ -29,19 +29,8 @@
* two quads are drawn without blending and two are drawn with alpha blending.
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <GL/glew.h>
#if defined(__APPLE__)
#include <GLUT/glut.h>
#else
#include <GL/glut.h>
#endif
#include "piglit-util.h"
static GLboolean Automatic = GL_FALSE;
static GLint prog;
static GLint fs;
......
......@@ -32,18 +32,6 @@
* fd.o bug #21638
*/
#include <assert.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#define GL_GLEXT_PROTOTYPES
#include "GL/glew.h"
#if defined(__APPLE__)
#include <GLUT/glut.h>
#else
#include "GL/glut.h"
#endif
#include "piglit-util.h"
#define WIN_WIDTH 200
......
......@@ -34,15 +34,6 @@
* the same operations against the far plane.
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <GL/glew.h>
#if defined(__APPLE__)
#include <GLUT/glut.h>
#else
#include <GL/glut.h>
#endif
#include "piglit-util.h"
/* In case the headers have the old enum name but not the new */
......
......@@ -31,15 +31,6 @@
* Caught a regression in the intel driver with the metaops clear code.
*/
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#if defined(__APPLE__)
#include <GLUT/glut.h>
#else
#include "GL/glut.h"
#endif
#include "piglit-util.h"
#define WIN_WIDTH 100
......
......@@ -32,15 +32,6 @@
* with the new metaops clear code.
*/
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#if defined(__APPLE__)
#include <GLUT/glut.h>
#else
#include "GL/glut.h"
#endif
#include "piglit-util.h"
#define WIN_WIDTH 100
......
......@@ -34,22 +34,13 @@
#include <windows.h>
#endif
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#if !defined(_MSC_VER)
#include <stdint.h>
#endif
#include <GL/glew.h>
#if defined(__APPLE__)
#include <GLUT/glut.h>
#else
#include <GL/glut.h>
#if defined(FREEGLUT)
#if !defined(__APPLE__) && defined(FREEGLUT)
#include <GL/freeglut_ext.h>
#endif
#endif
#include "piglit-util.h"
/* GLEW hasn't added support for this yet. */
......
......@@ -26,20 +26,8 @@
* Test basic line stippling functionality.
*/
#include <assert.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#if defined(__APPLE__)
#include <GLUT/glut.h>
#else
#include <GL/glut.h>
#endif
#include "piglit-util.h"
static int Width = 128, Height = 128;
static int Automatic = 0;
......
......@@ -29,17 +29,6 @@
* Simple test for GL_ARB_occlusion_query.
*/
#include <assert.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <GL/glew.h>
#if defined(__APPLE__)
#include <GLUT/glut.h>
#else
#include <GL/glut.h>
#endif
#include "piglit-util.h"
static int Width = 180, Height = 100;
......
......@@ -31,16 +31,6 @@
* Caught a bug with the Intel driver with the metaops drawpixels code.
*/
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <GL/glew.h>
#if defined(__APPLE__)
#include <GLUT/glut.h>
#else
#include "GL/glut.h"
#endif
#include "piglit-util.h"
#define WIN_WIDTH 100
......
......@@ -30,16 +30,6 @@
* Tests that using a PBO as the unpack buffer for glTexImage works correctly.
*/
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <GL/glew.h>
#if defined(__APPLE__)
#include <GLUT/glut.h>
#else
#include "GL/glut.h"
#endif
#include "piglit-util.h"
#define WIN_WIDTH 100
......
......@@ -31,18 +31,11 @@
* Second tri using GL_LAST_VERTEX_CONVENTION_EXT.
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#if defined(__APPLE__)
#include <GLUT/glut.h>
#else
#include <GL/glut.h>
#if defined(FREEGLUT)
#include "piglit-util.h"
#if !defined(__APPLE__) && defined(FREEGLUT)
#include <GL/freeglut_ext.h>
#endif
#endif
#include "piglit-util.h"
#ifndef APIENTRY
......
......@@ -35,15 +35,6 @@
* used as a draw buffer.
*/
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#if defined(__APPLE__)
#include <GLUT/glut.h>
#else
#include "GL/glut.h"
#endif
#include "piglit-util.h"
#define WIN_WIDTH 100
......
......@@ -30,15 +30,6 @@
* Tests that glScissor properly affects glCopyPixels().
*/
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#if defined(__APPLE__)
#include <GLUT/glut.h>
#else
#include "GL/glut.h"
#endif
#include "piglit-util.h"
#define WIN_WIDTH 100
......
......@@ -30,15 +30,6 @@
* Tests that glScissor properly affects glCopyPixels().
*/
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#if defined(__APPLE__)
#include <GLUT/glut.h>
#else
#include "GL/glut.h"
#endif
#include "piglit-util.h"
#define WIN_WIDTH 100
......
......@@ -30,15 +30,6 @@
* Tests that glScissor properly affects glClear of the stencil buffer.
*/
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#if defined(__APPLE__)
#include <GLUT/glut.h>
#else
#include "GL/glut.h"
#endif
#include "piglit-util.h"
#define WIN_WIDTH 100
......
......@@ -30,16 +30,6 @@
* Tests that glDrawPixels(GL_STENCIL) minimally works.
*/
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <assert.h>
#if defined(__APPLE__)
#include <GLUT/glut.h>
#else
#include "GL/glut.h"
#endif
#include "piglit-util.h"
#define WIN_WIDTH 100
......
......@@ -29,22 +29,15 @@
* Simple test of the API for GL_ARB_sync.
*/
#include <stdio.h>
#include <string.h>
#if !defined(_MSC_VER)
#include <stdint.h>
#endif
#if defined(__APPLE__)
#include <GLUT/glut.h>
#else
#include <GL/glut.h>
#if defined(FREEGLUT)
#include "piglit-util.h"
#if !defined(__APPLE__) && defined(FREEGLUT)
#include <GL/freeglut_ext.h>
#endif
#endif
#include "piglit-util.h"
#define FAIL_ON_ERROR(string) \
do { \
......
......@@ -26,20 +26,8 @@
* Test a number of basic TexGen functions.
*/
#include <assert.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#if defined(__APPLE__)
#include <GLUT/glut.h>
#else
#include <GL/glut.h>
#endif
#include "piglit-util.h"