MCPcopy Create free account
hub / github.com/KTStephano/StratusGFX / ClearColorLayer

Method ClearColorLayer

Source/Engine/StratusFrameBuffer.cpp:50–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48 }
49
50 void ClearColorLayer(const glm::vec4& rgba, const size_t colorIndex, const int layer) {
51 if (colorAttachments_.size() < colorIndex) {
52 throw std::runtime_error("Color index exceeds maximum total bound color buffers");
53 }
54
55 // TODO: There is a much better way to do this
56 // See https://registry.khronos.org/OpenGL-Refpages/gl4/html/glFramebufferTextureLayer.xhtml
57 // Followed by a regular glClear of the color attachment
58 Texture& color = colorAttachments_[colorIndex];
59 color.ClearLayer(0, layer, (const void *)&rgba[0]);
60 }
61
62 void ClearDepthStencilLayer(const int layer) {
63 if (depthStencilAttachment_ == Texture()) {

Callers

nothing calls this directly

Calls 1

ClearLayerMethod · 0.80

Tested by

no test coverage detected