summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/teximage.h
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2011-11-18 17:39:00 -0700
committerBrian Paul <[email protected]>2011-11-19 07:28:07 -0700
commit2efa3d4f9fd1e1683c5366d402d8740ecfb688e5 (patch)
treebb164b00ada68c6af90f8f536c548670acb9a23b /src/mesa/main/teximage.h
parenta43908fe62c39b84f014ddf2bee15cd07a77fc0d (diff)
mesa: define, use _mesa_is_cube_face() in several places
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/main/teximage.h')
-rw-r--r--src/mesa/main/teximage.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/main/teximage.h b/src/mesa/main/teximage.h
index fd315bea3db..9cc7d5a543e 100644
--- a/src/mesa/main/teximage.h
+++ b/src/mesa/main/teximage.h
@@ -36,6 +36,16 @@
#include "formats.h"
+/** Is the given value one of the 6 cube faces? */
+static inline GLboolean
+_mesa_is_cube_face(GLenum target)
+{
+ return (target >= GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB &&
+ target <= GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB);
+}
+
+
+
/** \name Internal functions */
/*@{*/