Lines Matching refs:fbo
28 CRFramebufferObjectState *fbo = &ctx->framebufferobject;
30 fbo->readFB = NULL;
31 fbo->drawFB = NULL;
32 fbo->renderbuffer = NULL;
60 static void crStateInitFrameBuffer(CRFramebufferObject *fbo);
143 CRFramebufferObjectState *fbo = &ctx->framebufferobject;
145 fbo->readFB = NULL;
146 fbo->drawFB = NULL;
147 fbo->renderbuffer = NULL;
154 CRFramebufferObjectState *fbo = &g->framebufferobject;
161 fbo->renderbuffer = (CRRenderbufferObject*) crHashtableSearch(g->shared->rbTable, renderbuffer);
162 if (!fbo->renderbuffer)
165 fbo->renderbuffer = crStateRenderbufferAllocate(g, renderbuffer);
167 CR_STATE_SHAREDOBJ_USAGE_SET(fbo->renderbuffer, g);
169 else fbo->renderbuffer = NULL;
212 CRFramebufferObjectState *fbo = &g->framebufferobject;
214 if (fbo->renderbuffer==rbo)
216 fbo->renderbuffer = NULL;
220 crStateCheckFBOAttachments(fbo->readFB, fboId, GL_READ_FRAMEBUFFER);
221 crStateCheckFBOAttachments(fbo->drawFB, fboId, GL_DRAW_FRAMEBUFFER);
230 CRFramebufferObjectState *fbo = &g->framebufferobject;
277 CRFramebufferObjectState *fbo = &g->framebufferobject;
278 CRRenderbufferObject *rb = fbo->renderbuffer;
293 CRFramebufferObjectState *fbo = &g->framebufferobject;
294 CRRenderbufferObject *rb = fbo->renderbuffer;
333 static void crStateInitFrameBuffer(CRFramebufferObject *fbo)
338 crStateInitFBOAttachmentPoint(&fbo->color[i]);
340 crStateInitFBOAttachmentPoint(&fbo->depth);
341 crStateInitFBOAttachmentPoint(&fbo->stencil);
343 fbo->readbuffer = GL_COLOR_ATTACHMENT0_EXT;
344 fbo->drawbuffer[0] = GL_COLOR_ATTACHMENT0_EXT;
347 fbo->status = GL_FRAMEBUFFER_UNDEFINED;
376 CRFramebufferObjectState *fbo = &g->framebufferobject;
404 fbo->readFB = pFBO;
405 fbo->drawFB = pFBO;
408 fbo->readFB = pFBO;
411 fbo->drawFB = pFBO;
418 CRFramebufferObjectState *fbo = &g->framebufferobject;
419 if (fbo->readFB==fb)
421 fbo->readFB = NULL;
423 if (fbo->drawFB==fb)
425 fbo->drawFB = NULL;
498 static GLuint crStateFramebufferGet(CRFramebufferObjectState *fbo, GLenum target, CRFramebufferObject **apFBOs)
505 apFBOs[0] = fbo->readFB;
509 apFBOs[0] = fbo->drawFB;
512 if (fbo->readFB == fbo->drawFB)
515 apFBOs[0] = fbo->readFB;
520 apFBOs[0] = fbo->readFB;
521 apFBOs[1] = fbo->drawFB;
537 CRFramebufferObjectState *fbo = &g->framebufferobject;
546 cFBOs = crStateFramebufferGet(fbo, target, apFBOs);
550 CRSTATE_CHECKERR_RET(!apFBOs[i], GL_INVALID_OPERATION, "zero fbo bound", 0);
624 CRFramebufferObjectState *fbo = &g->framebufferobject;
658 CRFramebufferObjectState *fbo = &g->framebufferobject;
696 CRFramebufferObjectState *fbo = &g->framebufferobject;
732 CRFramebufferObjectState *fbo = &g->framebufferobject;
741 cFBOs = crStateFramebufferGet(fbo, target, apFBOs);
742 CRSTATE_CHECKERR(!cFBOs, GL_INVALID_OPERATION, "no fbo bound");
745 CRSTATE_CHECKERR(!apFBOs[i], GL_INVALID_OPERATION, "zero fbo bound");
795 CRFramebufferObjectState *fbo = &g->framebufferobject;
804 cFBOs = crStateFramebufferGet(fbo, target, apFBOs);
806 CRSTATE_CHECKERR(!cFBOs, GL_INVALID_OPERATION, "no fbo bound");
809 CRSTATE_CHECKERR(!apFBOs[i], GL_INVALID_OPERATION, "zero fbo bound");
1162 CRFramebufferObjectState *fbo = &g->framebufferobject;
1168 pFBO = fbo->drawFB;
1171 pFBO = fbo->readFB;
1174 pFBO = fbo->drawFB;
1186 CRFramebufferObjectState *fbo = &g->framebufferobject;
1192 pFBO = fbo->drawFB;
1195 pFBO = fbo->readFB;
1198 pFBO = fbo->drawFB;