mesa: simplify att->CubeMapFace assignment
authorBrian Paul <brianp@vmware.com>
Sat, 24 Oct 2009 00:15:55 +0000 (18:15 -0600)
committerBrian Paul <brianp@vmware.com>
Sat, 24 Oct 2009 00:31:03 +0000 (18:31 -0600)
src/mesa/main/fbobject.c

index 18f6cec91e5c58acefa3f26ef39f34141c50a3c5..85d3d3db997df1d0924ced0723b19f81e5f1be6b 100644 (file)
@@ -240,12 +240,7 @@ _mesa_set_texture_attachment(GLcontext *ctx,
 
    /* always update these fields */
    att->TextureLevel = level;
-   if (IS_CUBE_FACE(texTarget)) {
-      att->CubeMapFace = texTarget - GL_TEXTURE_CUBE_MAP_POSITIVE_X;
-   }
-   else {
-      att->CubeMapFace = 0;
-   }
+   att->CubeMapFace = _mesa_tex_target_to_face(texTarget);
    att->Zoffset = zoffset;
    att->Complete = GL_FALSE;