From 7cbca3019799859b984192927f769f750b0b9ca5 Mon Sep 17 00:00:00 2001 From: Sergey Lipskiy Date: Thu, 14 May 2015 19:47:25 +0600 Subject: [PATCH] Disable resolveMultisampledTexture() for system without GL_MULTISAMPLING_SUPPORT --- src/DepthBuffer.cpp | 4 ++++ src/FrameBuffer.cpp | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/DepthBuffer.cpp b/src/DepthBuffer.cpp index f6c4c4f5..be6d0cc2 100644 --- a/src/DepthBuffer.cpp +++ b/src/DepthBuffer.cpp @@ -176,6 +176,7 @@ void DepthBuffer::initDepthBufferTexture(FrameBuffer * _pBuffer) CachedTexture * DepthBuffer::resolveDepthBufferTexture(FrameBuffer * _pBuffer) { +#ifdef GL_MULTISAMPLING_SUPPORT if (config.video.multisampling == 0) return m_pDepthBufferTexture; if (m_resolved) @@ -199,6 +200,9 @@ CachedTexture * DepthBuffer::resolveDepthBufferTexture(FrameBuffer * _pBuffer) m_resolved = true; gDP.changed |= CHANGED_SCISSOR; return m_pResolveDepthBufferTexture; +#else + return m_pDepthBufferTexture; +#endif } void DepthBuffer::activateDepthBufferTexture(FrameBuffer * _pBuffer) diff --git a/src/FrameBuffer.cpp b/src/FrameBuffer.cpp index 9e1ce4f5..526b0ec8 100644 --- a/src/FrameBuffer.cpp +++ b/src/FrameBuffer.cpp @@ -317,6 +317,7 @@ bool FrameBuffer::isValid() const void FrameBuffer::resolveMultisampledTexture() { +#ifdef GL_MULTISAMPLING_SUPPORT if (m_resolved) return; glScissor(0, 0, m_pTexture->realWidth, m_pTexture->realHeight); @@ -332,6 +333,7 @@ void FrameBuffer::resolveMultisampledTexture() glBindFramebuffer(GL_DRAW_FRAMEBUFFER, frameBufferList().getCurrent()->m_FBO); gDP.changed |= CHANGED_SCISSOR; m_resolved = true; +#endif } CachedTexture * FrameBuffer::getTexture()