void FramebufferObject::detachAll() {
    for (GLenum i = 0; i < CGT_FRAMEBUFFEROBJECT_MAX_SUPPORTED_COLOR_ATTACHMENTS; ++i) {
        if (colorAttachments_[i] != 0)
            detachTexture(GL_COLOR_ATTACHMENT0 + i);
    }
    if (depthAttachment_ != 0)
        detachTexture(GL_DEPTH_ATTACHMENT);
    if (stencilAttachment_ != 0)
        detachTexture(GL_STENCIL_ATTACHMENT);

    numColorAttachments_ = 0;
}
void Context::deleteTexture(GLuint texture)
{
    if (mResourceManager->getTexture(texture))
    {
        detachTexture(texture);
    }

    mResourceManager->deleteTexture(texture);
}
示例#3
0
void FramebufferObject::detachAll() {
	while(!_attachedTextures.empty())
			detachTexture(_attachedTextures.begin()->first);
}
示例#4
0
 void FramebufferObject::detachAll() {
   while (!attachedTextures_.empty()) {
     detachTexture(attachedTextures_.begin()->first);
   }
 }