diff options
author | Brian Paul <[email protected]> | 2006-08-17 14:25:04 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2006-08-17 14:25:04 +0000 |
commit | 9dc90cd5f35e1b286cc70f95f0dfe20ea356eeca (patch) | |
tree | f9a532af9ebf68c2418740a55dd17380cd6f3732 /src/mesa/main/occlude.c | |
parent | 5928718475e85c4c28ef4ec0cea961442ed3bdca (diff) |
added FEATURE_EXT_timer_query and tests
Diffstat (limited to 'src/mesa/main/occlude.c')
-rw-r--r-- | src/mesa/main/occlude.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mesa/main/occlude.c b/src/mesa/main/occlude.c index 0227ebbc7f7..5fef4a800dc 100644 --- a/src/mesa/main/occlude.c +++ b/src/mesa/main/occlude.c @@ -175,6 +175,7 @@ _mesa_BeginQueryARB(GLenum target, GLuint id) return; } break; +#if FEATURE_EXT_timer_query case GL_TIME_ELAPSED_EXT: if (!ctx->Extensions.EXT_timer_query) { _mesa_error(ctx, GL_INVALID_ENUM, "glBeginQueryARB(target)"); @@ -185,6 +186,7 @@ _mesa_BeginQueryARB(GLenum target, GLuint id) return; } break; +#endif default: _mesa_error(ctx, GL_INVALID_ENUM, "glBeginQueryARB(target)"); return; @@ -221,9 +223,11 @@ _mesa_BeginQueryARB(GLenum target, GLuint id) if (target == GL_SAMPLES_PASSED_ARB) { ctx->Query.CurrentOcclusionObject = q; } +#if FEATURE_EXT_timer_query else if (target == GL_TIME_ELAPSED_EXT) { ctx->Query.CurrentTimerObject = q; } +#endif if (ctx->Driver.BeginQuery) { ctx->Driver.BeginQuery(ctx, target, q); @@ -249,6 +253,7 @@ _mesa_EndQueryARB(GLenum target) q = ctx->Query.CurrentOcclusionObject; ctx->Query.CurrentOcclusionObject = NULL; break; +#if FEATURE_EXT_timer_query case GL_TIME_ELAPSED_EXT: if (!ctx->Extensions.EXT_timer_query) { _mesa_error(ctx, GL_INVALID_ENUM, "glEndQueryARB(target)"); @@ -257,6 +262,7 @@ _mesa_EndQueryARB(GLenum target) q = ctx->Query.CurrentTimerObject; ctx->Query.CurrentTimerObject = NULL; break; +#endif default: _mesa_error(ctx, GL_INVALID_ENUM, "glEndQueryARB(target)"); return; @@ -294,6 +300,7 @@ _mesa_GetQueryivARB(GLenum target, GLenum pname, GLint *params) } q = ctx->Query.CurrentOcclusionObject; break; +#if FEATURE_EXT_timer_query case GL_TIME_ELAPSED_EXT: if (!ctx->Extensions.EXT_timer_query) { _mesa_error(ctx, GL_INVALID_ENUM, "glEndQueryARB(target)"); @@ -301,6 +308,7 @@ _mesa_GetQueryivARB(GLenum target, GLenum pname, GLint *params) } q = ctx->Query.CurrentTimerObject; break; +#endif default: _mesa_error(ctx, GL_INVALID_ENUM, "glGetQueryivARB(target)"); return; @@ -408,6 +416,8 @@ _mesa_GetQueryObjectuivARB(GLuint id, GLenum pname, GLuint *params) } +#if FEATURE_EXT_timer_query + /** * New with GL_EXT_timer_query */ @@ -489,6 +499,8 @@ _mesa_GetQueryObjectui64vEXT(GLuint id, GLenum pname, GLuint64EXT *params) } } +#endif /* FEATURE_EXT_timer_query */ + /** * Allocate/init the context state related to query objects. |