summaryrefslogtreecommitdiff
path: root/src/mesa/main/texobj.c
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-01-28 10:27:33 -0700
committerBrian Paul <brianp@vmware.com>2009-01-28 10:27:33 -0700
commit4a89e51c5f88b57040b361b62e80a57c8248ba4b (patch)
tree266e23beb244c0c0301457b545b7dab71a592522 /src/mesa/main/texobj.c
parentbe1a76f88f4c3482e61e0a048a0b28b6b628f223 (diff)
mesa: set/get new state for GL_EXT_texture_swizzle
Diffstat (limited to 'src/mesa/main/texobj.c')
-rw-r--r--src/mesa/main/texobj.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c
index 7848f0be35..fad39a0634 100644
--- a/src/mesa/main/texobj.c
+++ b/src/mesa/main/texobj.c
@@ -42,6 +42,8 @@
#include "texstate.h"
#include "texobj.h"
#include "mtypes.h"
+#include "shader/prog_instruction.h"
+
/**********************************************************************/
@@ -138,6 +140,11 @@ _mesa_initialize_texture_object( struct gl_texture_object *obj,
obj->CompareFunc = GL_LEQUAL; /* ARB_shadow */
obj->DepthMode = GL_LUMINANCE; /* ARB_depth_texture */
obj->ShadowAmbient = 0.0F; /* ARB/SGIX_shadow_ambient */
+ obj->Swizzle[0] = GL_RED;
+ obj->Swizzle[1] = GL_GREEN;
+ obj->Swizzle[2] = GL_BLUE;
+ obj->Swizzle[3] = GL_ALPHA;
+ obj->_Swizzle = SWIZZLE_NOOP;
}
@@ -252,6 +259,8 @@ _mesa_copy_texture_object( struct gl_texture_object *dest,
dest->GenerateMipmap = src->GenerateMipmap;
dest->Palette = src->Palette;
dest->_Complete = src->_Complete;
+ COPY_4V(dest->Swizzle, src->Swizzle);
+ dest->_Swizzle = src->_Swizzle;
}