summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2015-09-16 14:10:35 +0200
committerAndras Timar <andras.timar@collabora.com>2015-09-19 21:32:21 +0200
commit8e8482f667022c01514e4a6a4257a1ce99671c9c (patch)
treed41a205f49cf86424e8d3a039402f00171659aae
parent90ee5ef2135caeb13c75dc5d813da95bdcbf248c (diff)
opengl: check framebuffer completeness
Change-Id: Idd80b7390694038ab0913edab0e496593beb0e15 (cherry picked from commit 7993663cc559e2a2c72804f7b4fa553f8c7441c3) Reviewed-on: https://gerrit.libreoffice.org/18625 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
-rw-r--r--vcl/opengl/framebuffer.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/vcl/opengl/framebuffer.cxx b/vcl/opengl/framebuffer.cxx
index b1135fcdf940..403c37922695 100644
--- a/vcl/opengl/framebuffer.cxx
+++ b/vcl/opengl/framebuffer.cxx
@@ -68,8 +68,11 @@ void OpenGLFramebuffer::AttachTexture( const OpenGLTexture& rTexture )
mnAttachedTexture = rTexture.Id();
mnWidth = rTexture.GetWidth();
mnHeight = rTexture.GetHeight();
- glFramebufferTexture2D( GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D,
- mnAttachedTexture, 0 );
+ glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, mnAttachedTexture, 0);
+ if (glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE)
+ {
+ SAL_WARN("vcl.opengl", "Framebuffer incomplete");
+ }
CHECK_GL_ERROR();
}