summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/context.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-02-21 15:15:20 -0700
committerBrian Paul <[email protected]>2009-02-21 15:15:20 -0700
commitd059d030342fc232a5b54298c0591f5f814f4adb (patch)
tree63b709b44ac9a6b07f184ed8ac209654a192c665 /src/mesa/main/context.c
parent9818734e0148510967ca9ee0d1aa8b196b509f02 (diff)
mesa: use enums for TEXTURE_x_INDEX values
Plus, put them in the order of highest to lowest priority to simplify the texture_override() loop.
Diffstat (limited to 'src/mesa/main/context.c')
-rw-r--r--src/mesa/main/context.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 04848794aa2..75b3992a29d 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -467,14 +467,15 @@ alloc_shared_state( GLcontext *ctx )
/* Create default texture objects */
for (i = 0; i < NUM_TEXTURE_TARGETS; i++) {
+ /* NOTE: the order of these enums matches the TEXTURE_x_INDEX values */
static const GLenum targets[NUM_TEXTURE_TARGETS] = {
- GL_TEXTURE_1D,
- GL_TEXTURE_2D,
- GL_TEXTURE_3D,
+ GL_TEXTURE_2D_ARRAY_EXT,
+ GL_TEXTURE_1D_ARRAY_EXT,
GL_TEXTURE_CUBE_MAP,
+ GL_TEXTURE_3D,
GL_TEXTURE_RECTANGLE_NV,
- GL_TEXTURE_1D_ARRAY_EXT,
- GL_TEXTURE_2D_ARRAY_EXT
+ GL_TEXTURE_2D,
+ GL_TEXTURE_1D
};
ss->DefaultTex[i] = ctx->Driver.NewTextureObject(ctx, 0, targets[i]);
if (!ss->DefaultTex[i])