[Piglit] [PATCH v3 04/19] Add glewInit() calls to GLX_ARB_create_context tests.
Paul Berry
stereotype441 at gmail.com
Wed Mar 21 08:58:03 PDT 2012
Previously these tests didn't initialize GLEW, because they only use
GLX functions and functions defined in GL 1.0 and 1.1 (all of which
bypass GLEW). But once we switch to using piglit-dispatch instead of
GLEW, we will need to initialize it in order for any GL functions to
work. This patch adds a call to glewInit() in the place where a call
to piglit_dispatch_default_init() will eventually be needed.
Reviewed-by: Chad Versace <chad.versace at linux.intel.com>
---
.../glx_arb_create_context/default-major-version.c | 1 +
.../glx_arb_create_context/default-minor-version.c | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/tests/spec/glx_arb_create_context/default-major-version.c b/tests/spec/glx_arb_create_context/default-major-version.c
index f20c912..84de990 100644
--- a/tests/spec/glx_arb_create_context/default-major-version.c
+++ b/tests/spec/glx_arb_create_context/default-major-version.c
@@ -52,6 +52,7 @@ int main(int argc, char **argv)
*/
ctx = glXCreateContextAttribsARB(dpy, fbconfig, NULL, True, attribs);
glXMakeContextCurrent(dpy, glxWin, glxWin, ctx);
+ glewInit();
version_string = (char *) glGetString(GL_VERSION);
diff --git a/tests/spec/glx_arb_create_context/default-minor-version.c b/tests/spec/glx_arb_create_context/default-minor-version.c
index 4af89c3..c006039 100644
--- a/tests/spec/glx_arb_create_context/default-minor-version.c
+++ b/tests/spec/glx_arb_create_context/default-minor-version.c
@@ -57,6 +57,7 @@ int main(int argc, char **argv)
}
glXMakeContextCurrent(dpy, glxWin, glxWin, ctx);
+ glewInit();
version_string = (char *) glGetString(GL_VERSION);
--
1.7.7.6
More information about the Piglit
mailing list