Home | History | Annotate | Download | only in main

Lines Matching refs:fb

51  * \param fb  the framebuffer to draw to, or read from
56 const struct gl_framebuffer *fb)
60 if (_mesa_is_user_fbo(fb)) {
68 if (fb->Visual.stereoMode) {
70 if (fb->Visual.doubleBufferMode) {
74 else if (fb->Visual.doubleBufferMode) {
78 for (i = 0; i < fb->Visual.numAuxBuffers; i++) {
257 * state var _and_ the FB's ColorDrawBuffer state.
258 * In the later case, we update the FB's ColorDrawBuffer state only.
261 * new FB is a window system FB, we need to re-update the FB's
268 draw_buffer(struct gl_context *ctx, struct gl_framebuffer *fb,
284 = supported_buffer_bitmask(ctx, fb);
302 _mesa_drawbuffers(ctx, fb, 1, &buffer, &destMask);
304 /* Call device driver function only if fb is the bound draw buffer */
305 if (fb == ctx->DrawBuffer) {
326 struct gl_framebuffer *fb;
329 fb = _mesa_lookup_framebuffer_err(ctx, framebuffer,
331 if (!fb)
335 fb = ctx->WinSysDrawBuffer;
337 draw_buffer(ctx, fb, buf, "glNamedFramebufferDrawBuffer");
353 draw_buffers(struct gl_context *ctx, struct gl_framebuffer *fb,
380 supportedMask = supported_buffer_bitmask(ctx, fb);
388 if (ctx->API == API_OPENGLES2 && _mesa_is_winsys_fbo(fb) &&
428 if (_mesa_is_winsys_fbo(fb) && ctx->Version >= 40 &&
451 if (_mesa_is_gles3(ctx) && _mesa_is_user_fbo(fb) &&
471 if (_mesa_is_user_fbo(fb) && buffers[output] >=
502 if (ctx->API == API_OPENGLES2 && _mesa_is_user_fbo(fb) &&
529 _mesa_drawbuffers(ctx, fb, n, buffers, destMask);
532 * Call device driver function if fb is the bound draw buffer.
537 if (fb == ctx->DrawBuffer) {
559 struct gl_framebuffer *fb;
562 fb = _mesa_lookup_framebuffer_err(ctx, framebuffer,
564 if (!fb)
568 fb = ctx->WinSysDrawBuffer;
570 draw_buffers(ctx, fb, n, bufs, "glNamedFramebufferDrawBuffers");
579 updated_drawbuffers(struct gl_context *ctx, struct gl_framebuffer *fb)
585 if (_mesa_is_user_fbo(fb)) {
586 fb->_Status = 0;
600 * \param fb the desired draw buffer
608 _mesa_drawbuffers(struct gl_context *ctx, struct gl_framebuffer *fb,
616 const GLbitfield supportedMask = supported_buffer_bitmask(ctx, fb);
635 if (fb->_ColorDrawBufferIndexes[count] != bufIndex) {
636 updated_drawbuffers(ctx, fb);
637 fb->_ColorDrawBufferIndexes[count] = bufIndex;
641 fb->ColorDrawBuffer[0] = buffers[0];
642 fb->_NumColorDrawBuffers = count;
651 if (fb->_ColorDrawBufferIndexes[buf] != bufIndex) {
652 updated_drawbuffers(ctx, fb);
653 fb->_ColorDrawBufferIndexes[buf] = bufIndex;
658 if (fb->_ColorDrawBufferIndexes[buf] != -1) {
659 updated_drawbuffers(ctx, fb);
660 fb->_ColorDrawBufferIndexes[buf] = -1;
663 fb->ColorDrawBuffer[buf] = buffers[buf];
665 fb->_NumColorDrawBuffers = count;
669 for (buf = fb->_NumColorDrawBuffers; buf < ctx->Const.MaxDrawBuffers; buf++) {
670 if (fb->_ColorDrawBufferIndexes[buf] != -1) {
671 updated_drawbuffers(ctx, fb);
672 fb->_ColorDrawBufferIndexes[buf] = -1;
676 fb->ColorDrawBuffer[buf] = GL_NONE;
679 if (_mesa_is_winsys_fbo(fb)) {
682 if (ctx->Color.DrawBuffer[buf] != fb->ColorDrawBuffer[buf]) {
683 updated_drawbuffers(ctx, fb);
684 ctx->Color.DrawBuffer[buf] = fb->ColorDrawBuffer[buf];
713 * \param fb the framebuffer object to update
718 _mesa_readbuffer(struct gl_context *ctx, struct gl_framebuffer *fb,
721 if ((fb == ctx->ReadBuffer) && _mesa_is_winsys_fbo(fb)) {
728 fb->ColorReadBuffer = buffer;
729 fb->_ColorReadBufferIndex = bufferIndex;
742 read_buffer(struct gl_context *ctx, struct gl_framebuffer *fb,
770 supportedMask = supported_buffer_bitmask(ctx, fb);
781 _mesa_readbuffer(ctx, fb, buffer, srcBuffer);
783 /* Call the device driver function only if fb is the bound read buffer */
784 if (fb == ctx->ReadBuffer) {
803 struct gl_framebuffer *fb;
806 fb = _mesa_lookup_framebuffer_err(ctx, framebuffer,
808 if (!fb)
812 fb = ctx->WinSysReadBuffer;
814 read_buffer(ctx, fb, src, "glNamedFramebufferReadBuffer");