From e21f45568637f531068359f66b3d339d2f8de292 Mon Sep 17 00:00:00 2001 From: Sergey Lipskiy Date: Thu, 2 Oct 2014 20:45:15 +0700 Subject: [PATCH] Don't call glBindImageTexture if it is not supported. --- FrameBuffer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/FrameBuffer.cpp b/FrameBuffer.cpp index 2cb5cfdd..1d7eb4f1 100644 --- a/FrameBuffer.cpp +++ b/FrameBuffer.cpp @@ -291,7 +291,8 @@ void FrameBufferList::attachDepthBuffer() #ifndef GLES2 GLuint attachments[1] = { GL_COLOR_ATTACHMENT0 }; glDrawBuffers(1, attachments); - glBindImageTexture(depthImageUnit, pDepthBuffer->m_pDepthTexture->glName, 0, GL_FALSE, 0, GL_READ_WRITE, GL_RGBA32F); + if (video().getRender().isImageTexturesSupported()) + glBindImageTexture(depthImageUnit, pDepthBuffer->m_pDepthTexture->glName, 0, GL_FALSE, 0, GL_READ_WRITE, GL_RGBA32F); #endif assert(checkFBO()); } else if (m_pCurrent != NULL) {