forked from AuroraMiddleware/gtk
ngl: fbo 0 has no color attachment
Query the backbuffer instead.
This commit is contained in:
parent
222d927e93
commit
4f53645e5d
@ -4071,7 +4071,10 @@ get_framebuffer_format (guint framebuffer)
|
||||
int size;
|
||||
|
||||
glBindFramebuffer (GL_FRAMEBUFFER, framebuffer);
|
||||
glGetFramebufferAttachmentParameteriv (GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE, &size);
|
||||
glGetFramebufferAttachmentParameteriv (GL_FRAMEBUFFER,
|
||||
framebuffer ? GL_COLOR_ATTACHMENT0
|
||||
: GL_BACK,
|
||||
GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE, &size);
|
||||
|
||||
if (size >= 32)
|
||||
return GL_RGBA32F;
|
||||
|
Loading…
Reference in New Issue
Block a user