[Piglit] [PATCH 04/15] Stop using GLEW_GET_FUN
Paul Berry
stereotype441 at gmail.com
Fri Mar 2 15:40:22 PST 2012
Some tests were using the GLEW_GET_FUN macro to retrieve GL function
pointers from GLEW. This was necessary using old versions of GLEW,
but it is not necessary anymore; now we can just refer to the GLEW
function pointers directly.
---
tests/general/occlusion_query.c | 20 ++++++++++----------
tests/texturing/gen-nonzero-unit.c | 4 ++--
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/tests/general/occlusion_query.c b/tests/general/occlusion_query.c
index c4f7b80..2528845 100644
--- a/tests/general/occlusion_query.c
+++ b/tests/general/occlusion_query.c
@@ -174,17 +174,17 @@ piglit_init(int argc, char **argv)
if (piglit_get_gl_version() >= 15) {
- gen_queries = GLEW_GET_FUN(__glewGenQueries);
- begin_query = GLEW_GET_FUN(__glewBeginQuery);
- end_query = GLEW_GET_FUN(__glewEndQuery);
- get_queryiv = GLEW_GET_FUN(__glewGetQueryiv);
- get_query_objectiv = GLEW_GET_FUN(__glewGetQueryObjectiv);
+ gen_queries = glGenQueries;
+ begin_query = glBeginQuery;
+ end_query = glEndQuery;
+ get_queryiv = glGetQueryiv;
+ get_query_objectiv = glGetQueryObjectiv;
} else if (piglit_is_extension_supported("ARB_occlusion_query")) {
- gen_queries = GLEW_GET_FUN(__glewGenQueriesARB);
- begin_query = GLEW_GET_FUN(__glewBeginQueryARB);
- end_query = GLEW_GET_FUN(__glewEndQueryARB);
- get_queryiv = GLEW_GET_FUN(__glewGetQueryivARB);
- get_query_objectiv = GLEW_GET_FUN(__glewGetQueryObjectivARB);
+ gen_queries = glGenQueriesARB;
+ begin_query = glBeginQueryARB;
+ end_query = glEndQueryARB;
+ get_queryiv = glGetQueryivARB;
+ get_query_objectiv = glGetQueryObjectivARB;
} else {
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/texturing/gen-nonzero-unit.c b/tests/texturing/gen-nonzero-unit.c
index b60073d..7284018 100644
--- a/tests/texturing/gen-nonzero-unit.c
+++ b/tests/texturing/gen-nonzero-unit.c
@@ -174,10 +174,10 @@ piglit_init(int argc, char **argv)
piglit_require_extension("GL_SGIS_generate_mipmap");
if (piglit_get_gl_version() >= 13) {
- ActiveTexture = GLEW_GET_FUN(__glewActiveTexture);
+ ActiveTexture = glActiveTexture;
} else {
piglit_require_extension("GL_ARB_multitexture");
- ActiveTexture = GLEW_GET_FUN(__glewActiveTextureARB);
+ ActiveTexture = glActiveTextureARB;
}
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
--
1.7.7.6
More information about the Piglit
mailing list