diff options
author | Brian Paul <[email protected]> | 2009-02-21 14:53:25 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-02-21 14:53:25 -0700 |
commit | 9818734e0148510967ca9ee0d1aa8b196b509f02 (patch) | |
tree | 28f32aeadff161ca159674699151063c4728d1bc /src/mesa/main/texparam.c | |
parent | 4d24b639d160fe485a3e8f7395e7654538be29e0 (diff) |
mesa: use an array for current texture objects
Use loops to consolidate lots of texture object code.
Diffstat (limited to 'src/mesa/main/texparam.c')
-rw-r--r-- | src/mesa/main/texparam.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c index 865aae86276..50f867e1c1c 100644 --- a/src/mesa/main/texparam.c +++ b/src/mesa/main/texparam.c @@ -92,29 +92,29 @@ get_texobj(GLcontext *ctx, GLenum target) switch (target) { case GL_TEXTURE_1D: - return texUnit->Current1D; + return texUnit->CurrentTex[TEXTURE_1D_INDEX]; case GL_TEXTURE_2D: - return texUnit->Current2D; + return texUnit->CurrentTex[TEXTURE_2D_INDEX]; case GL_TEXTURE_3D: - return texUnit->Current3D; + return texUnit->CurrentTex[TEXTURE_3D_INDEX]; case GL_TEXTURE_CUBE_MAP: if (ctx->Extensions.ARB_texture_cube_map) { - return texUnit->CurrentCubeMap; + return texUnit->CurrentTex[TEXTURE_CUBE_INDEX]; } break; case GL_TEXTURE_RECTANGLE_NV: if (ctx->Extensions.NV_texture_rectangle) { - return texUnit->CurrentRect; + return texUnit->CurrentTex[TEXTURE_RECT_INDEX]; } break; case GL_TEXTURE_1D_ARRAY_EXT: if (ctx->Extensions.MESA_texture_array) { - return texUnit->Current1DArray; + return texUnit->CurrentTex[TEXTURE_1D_ARRAY_INDEX]; } break; case GL_TEXTURE_2D_ARRAY_EXT: if (ctx->Extensions.MESA_texture_array) { - return texUnit->Current2DArray; + return texUnit->CurrentTex[TEXTURE_2D_ARRAY_INDEX]; } break; default: |