Fix RenderBuffer not being attached (bug introduced with commit 55b3becb7c
)
This commit is contained in:
parent
2578fce085
commit
5b70f208e3
@ -449,6 +449,13 @@ void FrameBufferAttachment::attach(State &state, GLenum target, GLenum attachmen
|
|||||||
{
|
{
|
||||||
unsigned int contextID = state.getContextID();
|
unsigned int contextID = state.getContextID();
|
||||||
|
|
||||||
|
if (_ximpl->targetType == Pimpl::RENDERBUFFER)
|
||||||
|
{
|
||||||
|
ext->glFramebufferRenderbuffer(target, attachment_point, GL_RENDERBUFFER_EXT, _ximpl->renderbufferTarget->getObjectID(contextID, ext));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// targetType must be a texture, make sure we have a valid texture object
|
||||||
Texture::TextureObject *tobj = 0;
|
Texture::TextureObject *tobj = 0;
|
||||||
if (_ximpl->textureTarget.valid())
|
if (_ximpl->textureTarget.valid())
|
||||||
{
|
{
|
||||||
@ -465,10 +472,8 @@ void FrameBufferAttachment::attach(State &state, GLenum target, GLenum attachmen
|
|||||||
|
|
||||||
switch (_ximpl->targetType)
|
switch (_ximpl->targetType)
|
||||||
{
|
{
|
||||||
default:
|
|
||||||
case Pimpl::RENDERBUFFER:
|
case Pimpl::RENDERBUFFER:
|
||||||
ext->glFramebufferRenderbuffer(target, attachment_point, GL_RENDERBUFFER_EXT, _ximpl->renderbufferTarget->getObjectID(contextID, ext));
|
break; // already handled above. case should never be hit, just here to quieten compiler warning.
|
||||||
break;
|
|
||||||
case Pimpl::TEXTURE1D:
|
case Pimpl::TEXTURE1D:
|
||||||
ext->glFramebufferTexture1D(target, attachment_point, GL_TEXTURE_1D, tobj->id(), _ximpl->level);
|
ext->glFramebufferTexture1D(target, attachment_point, GL_TEXTURE_1D, tobj->id(), _ximpl->level);
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user