* to determine which surfaces to draw to
*/
framebuffer->num_cbufs = 0;
- for (j = 0; j < MAX_DRAW_BUFFERS; j++) {
- for (i = 0; i < fb->_NumColorDrawBuffers[j]; i++) {
- strb = st_renderbuffer(fb->_ColorDrawBuffers[j][i]);
-
- /*printf("--------- framebuffer surface rtt %p\n", strb->rtt);*/
- if (strb->rtt) {
- /* rendering to a GL texture, may have to update surface */
- update_renderbuffer_surface(st, strb);
- }
+ for (i = 0; i < fb->_NumColorDrawBuffers; i++) {
+ strb = st_renderbuffer(fb->_ColorDrawBuffers[i]);
- if (strb->surface) {
- framebuffer->cbufs[framebuffer->num_cbufs] = strb->surface;
- framebuffer->num_cbufs++;
- }
+ /*printf("--------- framebuffer surface rtt %p\n", strb->rtt);*/
+ if (strb->rtt) {
+ /* rendering to a GL texture, may have to update surface */
+ update_renderbuffer_surface(st, strb);
+ }
-
- assert(strb->surface);
- framebuffer->cbufs[framebuffer->num_cbufs] = strb->surface;
- framebuffer->num_cbufs++;
++
++ if (strb->surface) {
++ framebuffer->cbufs[framebuffer->num_cbufs] = strb->surface;
++ framebuffer->num_cbufs++;
+ }
}
strb = st_renderbuffer(fb->Attachment[BUFFER_DEPTH].Renderbuffer);