[Piglit] [PATCH v2 03/13] Add glewInit() calls to GLX_ARB_create_context tests.

Paul Berry stereotype441 at gmail.com
Mon Mar 12 14:41:37 PDT 2012


Previously these tests didn't initialize GLEW, presumably because they
only use GL 1.0 functions, and those functions 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.
---
 .../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