diff options
-rw-r--r-- | src/piglit/gl_wrap.h | 12 | ||||
-rw-r--r-- | tests/glean/glwrap.h | 2 | ||||
-rw-r--r-- | tests/glean/tbase.h | 2 | ||||
-rw-r--r-- | tests/shaders/glsl-fs-pointcoord.c | 7 | ||||
-rw-r--r-- | tests/util/CMakeLists.gl.txt | 6 | ||||
-rw-r--r-- | tests/util/glxew.h | 1 | ||||
-rw-r--r-- | tests/util/piglit-dispatch.h | 7 | ||||
-rwxr-xr-x | tests/util/piglit-util.h | 6 |
8 files changed, 15 insertions, 28 deletions
diff --git a/src/piglit/gl_wrap.h b/src/piglit/gl_wrap.h index 8fddd2f07..3ccc36581 100644 --- a/src/piglit/gl_wrap.h +++ b/src/piglit/gl_wrap.h @@ -43,17 +43,7 @@ extern "C" { #endif #if defined(USE_OPENGL) -# include "glew.h" - /* Include the real headers too, in case GLEW misses something. */ -# ifdef __APPLE__ -# include <OpenGL/gl.h> -# include <OpenGL/glu.h> -# include <OpenGL/glext.h> -# else -# include <GL/gl.h> -# include <GL/glu.h> -# include <GL/glext.h> -# endif +# include "piglit-dispatch.h" #elif defined(USE_OPENGL_ES1) # include <GLES/gl.h> diff --git a/tests/glean/glwrap.h b/tests/glean/glwrap.h index 465acf1b6..d3404b49f 100644 --- a/tests/glean/glwrap.h +++ b/tests/glean/glwrap.h @@ -48,7 +48,7 @@ #ifndef __glwrap_h__ #define __glwrap_h__ -#include "../util/glew.h" +#include "../util/piglit-dispatch.h" #if defined(__WIN__) # include <windows.h> diff --git a/tests/glean/tbase.h b/tests/glean/tbase.h index 748ee62cd..f0ec27216 100644 --- a/tests/glean/tbase.h +++ b/tests/glean/tbase.h @@ -106,7 +106,7 @@ and tbasic.cpp. #ifndef __tbase_h__ #define __tbase_h__ -#include "glew.h" +#include "piglit-dispatch.h" #ifdef __UNIX__ #include <unistd.h> diff --git a/tests/shaders/glsl-fs-pointcoord.c b/tests/shaders/glsl-fs-pointcoord.c index 586789f4c..267c4e7b7 100644 --- a/tests/shaders/glsl-fs-pointcoord.c +++ b/tests/shaders/glsl-fs-pointcoord.c @@ -41,13 +41,6 @@ #include <stdlib.h> #include <errno.h> #include <sys/stat.h> -#define GL_GLEXT_PROTOTYPES -#include "glew.h" -#if defined(__APPLE__) -#include <GLUT/glut.h> -#else -#include "GL/glut.h" -#endif #include "piglit-util.h" diff --git a/tests/util/CMakeLists.gl.txt b/tests/util/CMakeLists.gl.txt index be3f46e83..2c13a7370 100644 --- a/tests/util/CMakeLists.gl.txt +++ b/tests/util/CMakeLists.gl.txt @@ -6,7 +6,8 @@ include_directories( set(UTIL_SOURCES ${UTIL_SOURCES} - glew.c + piglit-dispatch.c + piglit-dispatch-init.c piglit-shader.c piglit-shader-gl.c piglit-transform-feedback.c @@ -39,7 +40,8 @@ IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux") piglit-util-gl.c piglit-glx-framework.c piglit-glx-util.c - glew.c + piglit-dispatch.c + piglit-dispatch-init.c ) set (UTIL_SOURCES ${UTIL_SOURCES} diff --git a/tests/util/glxew.h b/tests/util/glxew.h index 1c80ec974..2e855c1b1 100644 --- a/tests/util/glxew.h +++ b/tests/util/glxew.h @@ -97,7 +97,6 @@ #include <X11/Xlib.h> #include <X11/Xutil.h> #include <X11/Xmd.h> -#include "glew.h" /* NOTE: changed for piglit, was <GL/glew.h> */ #ifdef __cplusplus extern "C" { diff --git a/tests/util/piglit-dispatch.h b/tests/util/piglit-dispatch.h index 1eea0e38d..08e4dae41 100644 --- a/tests/util/piglit-dispatch.h +++ b/tests/util/piglit-dispatch.h @@ -146,6 +146,13 @@ piglit_dispatch_resolve_function(const char *name); void piglit_dispatch_default_init(); +/* As a temporary measure, redirect glewInit() to + * piglit_dispatch_default_init(), so that we don't have to modify + * initialization code in old tests that were written before the + * piglit-dispatch mechanism. + */ +#define glewInit piglit_dispatch_default_init + /* Prevent gl.h from being included, since it will attempt to define * the functions we've already defined. */ diff --git a/tests/util/piglit-util.h b/tests/util/piglit-util.h index dd293bbc9..775dfe29d 100755 --- a/tests/util/piglit-util.h +++ b/tests/util/piglit-util.h @@ -104,11 +104,7 @@ int asprintf(char **strp, const char *fmt, ...) # define NAN (INFINITY - INFINITY) #endif -#ifdef _WIN32 -# define piglit_get_proc_address(x) wglGetProcAddress(x) -#else -# define piglit_get_proc_address(x) glutGetProcAddress(x) -#endif +#define piglit_get_proc_address(x) piglit_dispatch_resolve_function(x) enum piglit_result { PIGLIT_PASS, |