summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/fbobject.h
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2011-04-05 07:51:01 -0600
committerBrian Paul <[email protected]>2011-04-05 07:51:01 -0600
commitdb0f9e701d59dcfcd3b50f4d245897692f27fec9 (patch)
tree7ac61092cbfc0a9a76ee66ca244fb804e9ddd611 /src/mesa/main/fbobject.h
parente9375cd0e895ac2c3e7ff17f18da7a7f8cd3a82d (diff)
mesa: added _mesa_get_attachment_teximage() helpers
Diffstat (limited to 'src/mesa/main/fbobject.h')
-rw-r--r--src/mesa/main/fbobject.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/mesa/main/fbobject.h b/src/mesa/main/fbobject.h
index 0e1c096ab8d..7eb20050209 100644
--- a/src/mesa/main/fbobject.h
+++ b/src/mesa/main/fbobject.h
@@ -26,6 +26,7 @@
#ifndef FBOBJECT_H
#define FBOBJECT_H
+#include "compiler.h"
#include "glheader.h"
struct gl_context;
@@ -48,6 +49,24 @@ _mesa_get_attachment(struct gl_context *ctx, struct gl_framebuffer *fb,
GLenum attachment);
+/** Return the texture image for a renderbuffer attachment */
+static INLINE struct gl_texture_image *
+_mesa_get_attachment_teximage(struct gl_renderbuffer_attachment *att)
+{
+ assert(att->Type == GL_TEXTURE);
+ return att->Texture->Image[att->CubeMapFace][att->TextureLevel];
+}
+
+
+/** Return the (const) texture image for a renderbuffer attachment */
+static INLINE const struct gl_texture_image *
+_mesa_get_attachment_teximage_const(const struct gl_renderbuffer_attachment *att)
+{
+ assert(att->Type == GL_TEXTURE);
+ return att->Texture->Image[att->CubeMapFace][att->TextureLevel];
+}
+
+
extern void
_mesa_remove_attachment(struct gl_context *ctx,
struct gl_renderbuffer_attachment *att);