mesa: _mesa_ClearColorIuiEXT() and _mesa_ClearColorIiEXT()
For GL_EXT_texture_integer.
This commit is contained in:
parent
f6dbb693d2
commit
a0bc8eeb32
|
@ -95,6 +95,68 @@ _mesa_ClearColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha )
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* GL_EXT_texture_integer
|
||||
*/
|
||||
void GLAPIENTRY
|
||||
_mesa_ClearColorIiEXT(GLint r, GLint g, GLint b, GLint a)
|
||||
{
|
||||
GLfloat tmp[4];
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
ASSERT_OUTSIDE_BEGIN_END(ctx);
|
||||
|
||||
tmp[0] = (GLfloat) r;
|
||||
tmp[1] = (GLfloat) g;
|
||||
tmp[2] = (GLfloat) b;
|
||||
tmp[3] = (GLfloat) a;
|
||||
|
||||
if (TEST_EQ_4V(tmp, ctx->Color.ClearColor))
|
||||
return; /* no change */
|
||||
|
||||
FLUSH_VERTICES(ctx, _NEW_COLOR);
|
||||
|
||||
/* XXX we should eventually have a float/int/uint union for
|
||||
* the ctx->Color.ClearColor state.
|
||||
*/
|
||||
COPY_4V(ctx->Color.ClearColor, tmp);
|
||||
|
||||
if (ctx->Driver.ClearColor) {
|
||||
ctx->Driver.ClearColor(ctx, ctx->Color.ClearColor);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* GL_EXT_texture_integer
|
||||
*/
|
||||
void GLAPIENTRY
|
||||
_mesa_ClearColorIuiEXT(GLuint r, GLuint g, GLuint b, GLuint a)
|
||||
{
|
||||
GLfloat tmp[4];
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
ASSERT_OUTSIDE_BEGIN_END(ctx);
|
||||
|
||||
tmp[0] = (GLfloat) r;
|
||||
tmp[1] = (GLfloat) g;
|
||||
tmp[2] = (GLfloat) b;
|
||||
tmp[3] = (GLfloat) a;
|
||||
|
||||
if (TEST_EQ_4V(tmp, ctx->Color.ClearColor))
|
||||
return; /* no change */
|
||||
|
||||
FLUSH_VERTICES(ctx, _NEW_COLOR);
|
||||
|
||||
/* XXX we should eventually have a float/int/uint union for
|
||||
* the ctx->Color.ClearColor state.
|
||||
*/
|
||||
COPY_4V(ctx->Color.ClearColor, tmp);
|
||||
|
||||
if (ctx->Driver.ClearColor) {
|
||||
ctx->Driver.ClearColor(ctx, ctx->Color.ClearColor);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Clear buffers.
|
||||
*
|
||||
|
|
|
@ -37,6 +37,13 @@ extern void GLAPIENTRY
|
|||
_mesa_ClearColor( GLclampf red, GLclampf green,
|
||||
GLclampf blue, GLclampf alpha );
|
||||
|
||||
extern void GLAPIENTRY
|
||||
_mesa_ClearColorIiEXT(GLint r, GLint g, GLint b, GLint a);
|
||||
|
||||
extern void GLAPIENTRY
|
||||
_mesa_ClearColorIuiEXT(GLuint r, GLuint g, GLuint b, GLuint a);
|
||||
|
||||
|
||||
extern void GLAPIENTRY
|
||||
_mesa_Clear( GLbitfield mask );
|
||||
|
||||
|
|
Loading…
Reference in New Issue