diff options
author | Brian Paul <[email protected]> | 2011-01-12 08:08:22 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2011-01-15 18:35:45 -0700 |
commit | b3ca11059433c3eb807815c15fd41a561d3d8126 (patch) | |
tree | 6962e8a6834df5eb83a37232ddcdc6df16f80e46 | |
parent | 44c2122a737569e78af18c54994c3aa4035882ee (diff) |
mesa: implement glGet queries for GL_ARB_draw_buffers_blend
-rw-r--r-- | src/mesa/main/get.c | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c index 6f47eca28cc..e223cf425ab 100644 --- a/src/mesa/main/get.c +++ b/src/mesa/main/get.c @@ -2271,6 +2271,53 @@ find_value_indexed(const char *func, GLenum pname, int index, union value *v) v->value_int = (ctx->Color.BlendEnabled >> index) & 1; return TYPE_INT; + case GL_BLEND_SRC: + /* fall-through */ + case GL_BLEND_SRC_RGB: + if (index >= ctx->Const.MaxDrawBuffers) + goto invalid_value; + if (!ctx->Extensions.ARB_draw_buffers_blend) + goto invalid_enum; + v->value_int = ctx->Color.Blend[index].SrcRGB; + return TYPE_INT; + case GL_BLEND_SRC_ALPHA: + if (index >= ctx->Const.MaxDrawBuffers) + goto invalid_value; + if (!ctx->Extensions.ARB_draw_buffers_blend) + goto invalid_enum; + v->value_int = ctx->Color.Blend[index].SrcA; + return TYPE_INT; + case GL_BLEND_DST: + /* fall-through */ + case GL_BLEND_DST_RGB: + if (index >= ctx->Const.MaxDrawBuffers) + goto invalid_value; + if (!ctx->Extensions.ARB_draw_buffers_blend) + goto invalid_enum; + v->value_int = ctx->Color.Blend[index].DstRGB; + return TYPE_INT; + case GL_BLEND_DST_ALPHA: + if (index >= ctx->Const.MaxDrawBuffers) + goto invalid_value; + if (!ctx->Extensions.ARB_draw_buffers_blend) + goto invalid_enum; + v->value_int = ctx->Color.Blend[index].DstA; + return TYPE_INT; + case GL_BLEND_EQUATION_RGB: + if (index >= ctx->Const.MaxDrawBuffers) + goto invalid_value; + if (!ctx->Extensions.ARB_draw_buffers_blend) + goto invalid_enum; + v->value_int = ctx->Color.Blend[index].EquationRGB; + return TYPE_INT; + case GL_BLEND_EQUATION_ALPHA: + if (index >= ctx->Const.MaxDrawBuffers) + goto invalid_value; + if (!ctx->Extensions.ARB_draw_buffers_blend) + goto invalid_enum; + v->value_int = ctx->Color.Blend[index].EquationA; + return TYPE_INT; + case GL_COLOR_WRITEMASK: if (index >= ctx->Const.MaxDrawBuffers) goto invalid_value; |