From: Brian Date: Sat, 3 Nov 2007 16:19:10 +0000 (-0600) Subject: added st_resize_framebuffer() X-Git-Tag: 062012170305~17580^2~390^2~3460 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3d14b2c01e12823877ae9270c7a79da65681f25c;p=profile%2Fivi%2Fmesa.git added st_resize_framebuffer() --- diff --git a/src/mesa/state_tracker/st_framebuffer.c b/src/mesa/state_tracker/st_framebuffer.c index 1866971..99638c5 100644 --- a/src/mesa/state_tracker/st_framebuffer.c +++ b/src/mesa/state_tracker/st_framebuffer.c @@ -88,3 +88,17 @@ struct st_framebuffer *st_create_framebuffer( const __GLcontextModes *visual ) } +void st_resize_framebuffer( struct st_framebuffer *stfb, + GLuint width, GLuint height ) +{ + if (stfb->Base.Width != width || stfb->Base.Height != height) { + GET_CURRENT_CONTEXT(ctx); + if (ctx) { + _mesa_resize_framebuffer(ctx, &stfb->Base, width, height); + + assert(stfb->Base.Width == width); + assert(stfb->Base.Height == height); + } + } +} + diff --git a/src/mesa/state_tracker/st_public.h b/src/mesa/state_tracker/st_public.h index 94d1cdf..74a94d1 100644 --- a/src/mesa/state_tracker/st_public.h +++ b/src/mesa/state_tracker/st_public.h @@ -48,6 +48,9 @@ void st_destroy_context2( struct st_context *st ); struct st_framebuffer *st_create_framebuffer( const __GLcontextModes *visual ); +void st_resize_framebuffer( struct st_framebuffer *, + GLuint width, GLuint height ); + void st_make_current(struct st_context *st, struct st_framebuffer *draw, struct st_framebuffer *read);