[Mesa-dev] [PATCH v2 4/6] _mesa_create_exec_table: de-deprecate GetPointerv.
Paul Berry
stereotype441 at gmail.com
Mon Oct 22 17:22:44 PDT 2012
glGetPointerv was de-deprecated in GL 4.3, because GL 4.3 adds
functionality from KHR_debug and ARB_debug_output, which require
glGetPointerv.
This patch modifies _mesa_create_exec_table() to populate
glGetPointerv in the dispatch table for core contexts.
Technically this is not in compliance with the spec--what we really
ought to do for core contexts is expose glGetPointerv only when a GL
4.3 context is in use or one of the two extensions is present.
However, it seems silly to go to that extra work, since the only
client-visible effect would be for glGetPointerv to raise an
INVALID_OPERATION error instead of an INVALID_ENUM error. Besides,
the other functions set up by _mesa_create_exec_table() only depend on
the API in use, not on the GL version or extensions supported.
Reviewed-by: Brian Paul <brianp at vmware.com>
Cc: Jordan Justen <jljusten at gmail.com>
---
src/mesa/main/api_exec.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/mesa/main/api_exec.c b/src/mesa/main/api_exec.c
index e2a503d..9958496 100644
--- a/src/mesa/main/api_exec.c
+++ b/src/mesa/main/api_exec.c
@@ -322,10 +322,12 @@ _mesa_create_exec_table(struct gl_context *ctx)
SET_DisableClientState(exec, _mesa_DisableClientState);
SET_EdgeFlagPointer(exec, _mesa_EdgeFlagPointer);
SET_EnableClientState(exec, _mesa_EnableClientState);
- SET_GetPointerv(exec, _mesa_GetPointerv);
SET_IndexPointer(exec, _mesa_IndexPointer);
SET_InterleavedArrays(exec, _mesa_InterleavedArrays);
}
+ if (ctx->API != API_OPENGLES2) {
+ SET_GetPointerv(exec, _mesa_GetPointerv);
+ }
SET_IsTexture(exec, _mesa_IsTexture);
if (ctx->API != API_OPENGL_CORE && ctx->API != API_OPENGLES2) {
SET_NormalPointer(exec, _mesa_NormalPointer);
--
1.7.12.4
More information about the mesa-dev
mailing list