cginternals / cginternals/gloperate

Unable to clear color buffers other than 0

Open
#398 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
C++
Stars
43
Forks
24
PR merge metrics
No merged PRs in 30d

Description

`ClearStage` uses `RenderInterface::obtainFBO(size_t index, AbstractRenderTarget * renderTarget)` to get an FBO for a specific attachment. This overload does not set draw buffers and neither does the clear stage. This works for color buffer 0, as the default value for the draw buffers array is [GL_COLOR_ATTACHMENT0, GL_NONE, GL_NONE, ...] (see https://computergraphics.stackexchange.com/a/3937), but fails for any additional color buffer.

Who should be responsible for seting the draw buffers?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with ClearStage and RenderInterface::obtainFBO(size_t index, AbstractRenderTarget * renderTarget), then trace how draw buffers are configured for framebuffer attachments. Done means establishing the responsibility for setting draw buffers and ensuring clearing works for color attachments beyond index 0.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.