diff options
author | Brian Paul <[email protected]> | 2016-02-11 08:14:27 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2016-02-12 15:11:38 -0700 |
commit | 6e09df24b5cd7da0f49622db15ca70f5b2a3594b (patch) | |
tree | 0b1cb48ccf77d1aa2cbf36cfc0d3b16e5a5f96eb /src/mesa/main/texobj.c | |
parent | 82db969ac014531dcaba4e4637d6c691f5825e4b (diff) |
mesa: simplify some code with new _mesa_cube_face_target() function
Reviewed-by: Roland Scheidegger <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/mesa/main/texobj.c')
-rw-r--r-- | src/mesa/main/texobj.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c index c63d443bf29..d8407f04340 100644 --- a/src/mesa/main/texobj.c +++ b/src/mesa/main/texobj.c @@ -1036,12 +1036,7 @@ _mesa_get_fallback_texture(struct gl_context *ctx, gl_texture_index tex) /* need a loop here just for cube maps */ for (face = 0; face < numFaces; face++) { - GLenum faceTarget; - - if (target == GL_TEXTURE_CUBE_MAP) - faceTarget = GL_TEXTURE_CUBE_MAP_POSITIVE_X + face; - else - faceTarget = target; + const GLenum faceTarget = _mesa_cube_face_target(target, face); /* initialize level[0] texture image */ texImage = _mesa_get_tex_image(ctx, texObj, faceTarget, 0); |