* Set/replace a framebuffer surface.
* The user of the state tracker can use this instead of
* st_resize_framebuffer() to provide new surfaces when a window is resized.
+ * \param surfIndex an ST_SURFACE_x index
*/
void
st_set_framebuffer_surface(struct st_framebuffer *stfb,
struct st_renderbuffer *strb;
GLuint width, height, i;
+ /* sanity checks */
+ assert(ST_SURFACE_FRONT_LEFT == BUFFER_FRONT_LEFT);
+ assert(ST_SURFACE_BACK_LEFT == BUFFER_BACK_LEFT);
+ assert(ST_SURFACE_FRONT_RIGHT == BUFFER_FRONT_RIGHT);
+ assert(ST_SURFACE_BACK_RIGHT == BUFFER_BACK_RIGHT);
+ assert(ST_SURFACE_DEPTH == BUFFER_DEPTH);
+
assert(surfIndex < BUFFER_COUNT);
strb = st_renderbuffer(stfb->Base.Attachment[surfIndex].Renderbuffer);
#include "pipe/p_compiler.h"
#include "pipe/p_format.h"
-
+/** Renderbuffer surfaces (should match Mesa names) */
#define ST_SURFACE_FRONT_LEFT 0
#define ST_SURFACE_BACK_LEFT 1
#define ST_SURFACE_FRONT_RIGHT 2