summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2009-11-20 14:30:15 -0800
committerIan Romanick <ian.d.romanick@intel.com>2009-11-20 14:30:15 -0800
commit1c1f588d5bd1931b83e9526c2c09389b12e4a5a4 (patch)
tree17a734f0bb5875dda2ed4439e3f92e61e9c68d86
parent187a583e94bca2bb8ec60fc7b489992c959adfc4 (diff)
depth-tex-modes: Add header file for inteface between test files
-rw-r--r--tests/texturing/depth-tex-modes-common.c8
-rw-r--r--tests/texturing/depth-tex-modes-common.h44
-rw-r--r--tests/texturing/depth-tex-modes-rg.c1
-rw-r--r--tests/texturing/depth-tex-modes.c1
4 files changed, 48 insertions, 6 deletions
diff --git a/tests/texturing/depth-tex-modes-common.c b/tests/texturing/depth-tex-modes-common.c
index 735b34eff..781f4fc3e 100644
--- a/tests/texturing/depth-tex-modes-common.c
+++ b/tests/texturing/depth-tex-modes-common.c
@@ -30,17 +30,13 @@
*/
#include "piglit-util.h"
-
-extern GLuint tex[2];
+#include "depth-tex-modes-common.h"
static void loadTex(void);
void
-depth_tex_init(int argc, char **argv)
+depth_tex_init(void)
{
- (void) argc;
- (void) argv;
-
piglit_require_extension("GL_ARB_depth_texture");
piglit_require_extension("GL_ARB_texture_rectangle");
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
diff --git a/tests/texturing/depth-tex-modes-common.h b/tests/texturing/depth-tex-modes-common.h
new file mode 100644
index 000000000..df04ddb71
--- /dev/null
+++ b/tests/texturing/depth-tex-modes-common.h
@@ -0,0 +1,44 @@
+/*
+ * Copyright © 2009 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.
+ */
+
+/**
+ * \file depth-tex-modes-common.h
+ * Common framework for tests of GL_DEPTH_TEXTURE_MODE.
+ *
+ * \author Ben Holmes
+ * \author Ian Romanick
+ */
+
+#ifndef DEPTH_TEX_MODES_COMMON_H
+#define DEPTH_TEX_MODES_COMMON_H
+
+/* Actually in the main test file.
+ */
+extern GLuint tex[2];
+
+extern void depth_tex_init(void);
+
+extern enum piglit_result depth_tex_display(const GLenum *depth_texture_modes,
+ unsigned num_modes, unsigned box_size);
+
+#endif /* DEPTH_TEX_MODES_COMMON_H */
diff --git a/tests/texturing/depth-tex-modes-rg.c b/tests/texturing/depth-tex-modes-rg.c
index 4e72ce9e4..048749505 100644
--- a/tests/texturing/depth-tex-modes-rg.c
+++ b/tests/texturing/depth-tex-modes-rg.c
@@ -30,6 +30,7 @@
#include "piglit-util.h"
#include "piglit-framework.h"
+#include "depth-tex-modes-common.h"
static const GLenum depth_texture_modes[] = {
GL_RED
diff --git a/tests/texturing/depth-tex-modes.c b/tests/texturing/depth-tex-modes.c
index f6616444c..5cc4f9499 100644
--- a/tests/texturing/depth-tex-modes.c
+++ b/tests/texturing/depth-tex-modes.c
@@ -30,6 +30,7 @@
#include "piglit-util.h"
#include "piglit-framework.h"
+#include "depth-tex-modes-common.h"
static const GLenum depth_texture_modes[] = {
GL_ALPHA, GL_LUMINANCE, GL_INTENSITY