diff options
author | Brian <brian.paul@tungstengraphics.com> | 2007-11-01 18:37:00 -0600 |
---|---|---|
committer | Brian <brian.paul@tungstengraphics.com> | 2007-11-01 18:37:00 -0600 |
commit | d8e66aca8443c6802ecd8f1a353024ed1d0f32c3 (patch) | |
tree | c0038761beedea1e4854981c2fbfb7a6942ce722 /src/mesa/state_tracker/st_cb_flush.c | |
parent | 28bed6d355e7ea3acbc4dbef0490e269d560f89e (diff) |
Start re-working SwapBuffers.
intelCopyBuffer() is now intelDisplayBuffer(): it displays the given surface
in the on-screen window.
Added a pipe_surface parameter to winsys->flush_frontbuffer().
Front buffer rendering/flushing actually works now.
But, we should only allocate the front surface on demand...
Diffstat (limited to 'src/mesa/state_tracker/st_cb_flush.c')
-rw-r--r-- | src/mesa/state_tracker/st_cb_flush.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_cb_flush.c b/src/mesa/state_tracker/st_cb_flush.c index 41f21c361c..c2c3c80b87 100644 --- a/src/mesa/state_tracker/st_cb_flush.c +++ b/src/mesa/state_tracker/st_cb_flush.c @@ -35,6 +35,7 @@ #include "main/macros.h" #include "st_context.h" #include "st_cb_flush.h" +#include "st_cb_fbo.h" #include "pipe/p_context.h" #include "pipe/p_defines.h" #include "pipe/p_winsys.h" @@ -59,9 +60,13 @@ static void st_flush(GLcontext *ctx) if (st->flags.frontbuffer_dirty) { + struct st_renderbuffer *strb + = st_renderbuffer(ctx->DrawBuffer->Attachment[BUFFER_FRONT_LEFT].Renderbuffer); + struct pipe_surface *front_surf = strb->surface; + /* Hook for copying "fake" frontbuffer if necessary: */ - st->pipe->winsys->flush_frontbuffer( st->pipe->winsys ); + st->pipe->winsys->flush_frontbuffer( st->pipe->winsys, front_surf ); st->flags.frontbuffer_dirty = 0; } } |