diff options
author | Chad Versace <chad.versace@intel.com> | 2011-02-23 16:36:43 -0800 |
---|---|---|
committer | Chad Versace <chad.versace@intel.com> | 2011-02-25 20:42:14 -0800 |
commit | 5a78cfbda788c13e1885240ddf9ac1fd968707dd (patch) | |
tree | 949e3f44b373b686db1bd26bcd73a07adaf6ef07 | |
parent | fc493b486b8f9b85af05eb854f04bb581b94250f (diff) |
piglit: Add header <piglit/gl_wrap.h>
A convenience header that includes the actual OpenGL headers, which are
chosen according to the macro definitions USE_OPENGL and USE_OPENGL_ES2.
Note: This belongs to a series that adds GLES2 support to Piglit.
Signed-off-by: Chad Versace <chad.versace@intel.com>
-rw-r--r-- | CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/piglit/gl_wrap.h | 56 | ||||
-rw-r--r-- | tests/CMakeLists.txt | 1 |
3 files changed, 57 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 083cde638..2e259bce6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,4 +39,5 @@ configure_file( "${piglit_SOURCE_DIR}/tests/util/config.h" ) +include_directories(src) add_subdirectory(cmake/target_api) diff --git a/src/piglit/gl_wrap.h b/src/piglit/gl_wrap.h new file mode 100644 index 000000000..7d77f7f91 --- /dev/null +++ b/src/piglit/gl_wrap.h @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2010 Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + * + * Authors: + * Chad Versace <chad.versace@intel.com> + */ + +/** + * \file gl_wrap.h + * \brief Convenience header that includes the actual OpenGL headers. + * + * The actual OpenGL headers are chosen according to the macro definitions + * USE_OPENGL and USE_OPENGL_ES2. + */ + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef USE_OPENGL +# include "glew.h" + /* Include the real headers too, in case GLEW misses something. */ +# include <GL/gl.h> +# include <GL/glu.h> +# include <GL/glext.h> +#endif + +#ifdef USE_OPENGL_ES2 +# include <GLES2/gl2.h> +# include <GLES2/gl2ext.h> +#endif + +#ifdef __cplusplus +} /* end extern "C" */ +#endif diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 748cc88d9..8dec193c0 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,4 +1,3 @@ - add_subdirectory (util) add_subdirectory (bugs) add_subdirectory (fbo) |