summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChad Versace <chad.versace@intel.com>2011-02-23 16:36:43 -0800
committerChad Versace <chad.versace@intel.com>2011-02-25 20:42:14 -0800
commit5a78cfbda788c13e1885240ddf9ac1fd968707dd (patch)
tree949e3f44b373b686db1bd26bcd73a07adaf6ef07 /src
parentfc493b486b8f9b85af05eb854f04bb581b94250f (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>
Diffstat (limited to 'src')
-rw-r--r--src/piglit/gl_wrap.h56
1 files changed, 56 insertions, 0 deletions
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