summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/fbobject.c
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.c
parente9375cd0e895ac2c3e7ff17f18da7a7f8cd3a82d (diff)
mesa: added _mesa_get_attachment_teximage() helpers
Diffstat (limited to 'src/mesa/main/fbobject.c')
-rw-r--r--src/mesa/main/fbobject.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index 4eab3e11911..f0065ad06a9 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -335,7 +335,7 @@ _mesa_set_texture_attachment(struct gl_context *ctx,
att->Zoffset = zoffset;
att->Complete = GL_FALSE;
- if (att->Texture->Image[att->CubeMapFace][att->TextureLevel]) {
+ if (_mesa_get_attachment_teximage(att)) {
ctx->Driver.RenderTexture(ctx, fb, att);
}
@@ -716,8 +716,8 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx,
/* get width, height, format of the renderbuffer/texture
*/
if (att->Type == GL_TEXTURE) {
- const struct gl_texture_image *texImg
- = att->Texture->Image[att->CubeMapFace][att->TextureLevel];
+ const struct gl_texture_image *texImg =
+ _mesa_get_attachment_teximage(att);
minWidth = MIN2(minWidth, texImg->Width);
maxWidth = MAX2(maxWidth, texImg->Width);
minHeight = MIN2(minHeight, texImg->Height);
@@ -1496,9 +1496,7 @@ check_begin_texture_render(struct gl_context *ctx, struct gl_framebuffer *fb)
for (i = 0; i < BUFFER_COUNT; i++) {
struct gl_renderbuffer_attachment *att = fb->Attachment + i;
- struct gl_texture_object *texObj = att->Texture;
- if (texObj
- && texObj->Image[att->CubeMapFace][att->TextureLevel]) {
+ if (att->Texture && _mesa_get_attachment_teximage(att)) {
ctx->Driver.RenderTexture(ctx, fb, att);
}
}