summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-08-10 11:35:57 -0600
committerBrian <[email protected]>2007-08-10 11:35:57 -0600
commit3738606a52b585108d709ce6be8565fc6144cbc7 (patch)
tree8a0a4e46902e1ad4a3c413039e9937a43653523a /src
parent137ec509946bba39940d3a7932bf196450cb951e (diff)
more render to texture work
Diffstat (limited to 'src')
-rw-r--r--src/mesa/state_tracker/st_cb_fbo.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c
index 99c00916f48..64ec8022164 100644
--- a/src/mesa/state_tracker/st_cb_fbo.c
+++ b/src/mesa/state_tracker/st_cb_fbo.c
@@ -283,26 +283,23 @@ st_render_texture(GLcontext *ctx,
struct gl_renderbuffer_attachment *att)
{
struct st_context *st = ctx->st;
+ struct st_renderbuffer *strb = st_renderbuffer(att->Renderbuffer);
struct pipe_context *pipe = st->pipe;
struct pipe_framebuffer_state framebuffer;
- struct pipe_surface *texsurface;
struct pipe_mipmap_tree *mt;
mt = st_get_texobj_mipmap_tree(att->Texture);
- texsurface = pipe->get_tex_surface(pipe, mt,
- att->CubeMapFace,
- att->TextureLevel,
- att->Zoffset);
+ /* the renderbuffer's surface is inside the mipmap_tree: */
+ strb->surface = pipe->get_tex_surface(pipe, mt,
+ att->CubeMapFace,
+ att->TextureLevel,
+ att->Zoffset);
- /*
- * XXX basically like this... set the current color (or depth)
- * drawing surface to be the given texture renderbuffer.
- */
+ /* update pipe's framebuffer state */
memset(&framebuffer, 0, sizeof(framebuffer));
framebuffer.num_cbufs = 1;
- framebuffer.cbufs[0] = texsurface;
-
+ framebuffer.cbufs[0] = strb->surface;
if (memcmp(&framebuffer, &st->state.framebuffer, sizeof(framebuffer)) != 0) {
st->state.framebuffer = framebuffer;
st->pipe->set_framebuffer_state( st->pipe, &framebuffer );