Changed code:
else if (attachmentObject->isRenderBufferAttachment())
{
implementation().attachRenderBuffer(this, attachment, nullptr);
}
To:
else if (attachmentObject->isRenderBufferAttachment())
{
implementation().attachRenderBuffer(this, attachment, attachmentObject->asRenderBufferAttachment()->renderBuffer());
}
Thanks for reporting. I solved the issue by explicitly handling the nullptr case. Your solution would not crash but does not detach the renderbuffer either.
Changed code: else if (attachmentObject->isRenderBufferAttachment()) { implementation().attachRenderBuffer(this, attachment, nullptr); }
To: else if (attachmentObject->isRenderBufferAttachment()) { implementation().attachRenderBuffer(this, attachment, attachmentObject->asRenderBufferAttachment()->renderBuffer()); }