mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-11 03:40:22 +01:00
mesa: added tex unit assert, use Elements() macro
This commit is contained in:
parent
cd130b0319
commit
a32e7c487c
1 changed files with 2 additions and 1 deletions
|
|
@ -273,6 +273,7 @@ window_pos3f(GLfloat x, GLfloat y, GLfloat z)
|
|||
{
|
||||
GLuint texSet;
|
||||
for (texSet = 0; texSet < ctx->Const.MaxTextureCoordUnits; texSet++) {
|
||||
assert(texSet < Elements(ctx->Current.RasterTexCoords));
|
||||
COPY_4FV( ctx->Current.RasterTexCoords[texSet],
|
||||
ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texSet] );
|
||||
}
|
||||
|
|
@ -562,7 +563,7 @@ void _mesa_init_rastpos( GLcontext * ctx )
|
|||
ASSIGN_4V( ctx->Current.RasterColor, 1.0, 1.0, 1.0, 1.0 );
|
||||
ASSIGN_4V( ctx->Current.RasterSecondaryColor, 0.0, 0.0, 0.0, 1.0 );
|
||||
ctx->Current.RasterIndex = 1.0;
|
||||
for (i = 0; i < MAX_TEXTURE_COORD_UNITS; i++)
|
||||
for (i = 0; i < Elements(ctx->Current.RasterTexCoords); i++)
|
||||
ASSIGN_4V( ctx->Current.RasterTexCoords[i], 0.0, 0.0, 0.0, 1.0 );
|
||||
ctx->Current.RasterPosValid = GL_TRUE;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue