| 128 | } |
| 129 | |
| 130 | bool Framebuffer::detach(const GLenum attachment) |
| 131 | { |
| 132 | FramebufferAttachment * attachmentObject = getAttachment(attachment); |
| 133 | |
| 134 | if (!attachmentObject) |
| 135 | return false; |
| 136 | |
| 137 | if (attachmentObject->isTextureAttachment()) |
| 138 | { |
| 139 | AttachedTexture * textureAttachment = attachmentObject->asTextureAttachment(); |
| 140 | |
| 141 | if (textureAttachment->hasLayer()) |
| 142 | { |
| 143 | implementation().attachTextureLayer(this, attachment, nullptr, textureAttachment->level(), textureAttachment->layer()); |
| 144 | } |
| 145 | else |
| 146 | { |
| 147 | implementation().attachTexture(this, attachment, nullptr, textureAttachment->level()); |
| 148 | } |
| 149 | } |
| 150 | else if (attachmentObject->isRenderBufferAttachment()) |
| 151 | { |
| 152 | implementation().attachRenderBuffer(this, attachment, nullptr); |
| 153 | } |
| 154 | |
| 155 | m_attachments.erase(attachment); |
| 156 | |
| 157 | return true; |
| 158 | } |
| 159 | |
| 160 | void Framebuffer::setReadBuffer(const GLenum mode) const |
| 161 | { |
nothing calls this directly
no test coverage detected