Selaa lähdekoodia

added st_notify_swapbuffers()

tags/mesa_20090313
Brian 18 vuotta sitten
vanhempi
commit
74866737db
2 muutettua tiedostoa jossa 19 lisäystä ja 0 poistoa
  1. 17
    0
      src/mesa/state_tracker/st_framebuffer.c
  2. 2
    0
      src/mesa/state_tracker/st_public.h

+ 17
- 0
src/mesa/state_tracker/st_framebuffer.c Näytä tiedosto

@@ -132,3 +132,20 @@ st_get_framebuffer_surface(struct st_framebuffer *stfb, uint surfIndex)
return strb->surface;
return NULL;
}


/**
* This function is to be called prior to SwapBuffers on the given
* framebuffer. It checks if the current context is bound to the framebuffer
* and flushes rendering if needed.
*/
void
st_notify_swapbuffers(struct st_framebuffer *stfb)
{
GET_CURRENT_CONTEXT(ctx);

if (ctx && ctx->DrawBuffer == &stfb->Base) {
st_flush(ctx->st);
}
}


+ 2
- 0
src/mesa/state_tracker/st_public.h Näytä tiedosto

@@ -71,4 +71,6 @@ void st_invalidate_state(GLcontext * ctx, GLuint new_state);

void st_flush( struct st_context *st );

void st_notify_swapbuffers(struct st_framebuffer *stfb);

#endif

Loading…
Peruuta
Tallenna