aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/texobj.h
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-08-27 08:17:50 +0200
committermarha <marha@users.sourceforge.net>2012-09-04 14:23:00 +0200
commit02b914d3b9b658a16e17cf2d95deede75dbbacc9 (patch)
tree3757711ab3e1db8e1b59877354096503d9635112 /mesalib/src/mesa/main/texobj.h
parentf479a5fc7f844d96b169c399cb1e8ac085de6c2b (diff)
downloadvcxsrv-02b914d3b9b658a16e17cf2d95deede75dbbacc9.tar.gz
vcxsrv-02b914d3b9b658a16e17cf2d95deede75dbbacc9.tar.bz2
vcxsrv-02b914d3b9b658a16e17cf2d95deede75dbbacc9.zip
xwininfo fontconfig libX11 libXau libXext libxcb mesa pixman
xkeyboard-config git update 27 Aug 2012
Diffstat (limited to 'mesalib/src/mesa/main/texobj.h')
-rw-r--r--mesalib/src/mesa/main/texobj.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/mesalib/src/mesa/main/texobj.h b/mesalib/src/mesa/main/texobj.h
index 93e0d7738..a6f1d3a14 100644
--- a/mesalib/src/mesa/main/texobj.h
+++ b/mesalib/src/mesa/main/texobj.h
@@ -78,6 +78,17 @@ _mesa_reference_texobj(struct gl_texture_object **ptr,
}
+/**
+ * Return number of faces for a texture target. This will be 6 for
+ * cube maps (and cube map arrays) and 1 otherwise.
+ */
+static inline GLuint
+_mesa_num_tex_faces(GLenum target)
+{
+ return target == GL_TEXTURE_CUBE_MAP ? 6 : 1;
+}
+
+
/** Is the texture "complete" with respect to the given sampler state? */
static inline GLboolean
_mesa_is_texture_complete(const struct gl_texture_object *texObj,