summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/fbobject.h
diff options
context:
space:
mode:
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);