[android] Fixed compilation for Android ARM platform

This commit is contained in:
Alex Zolotarev 2012-11-07 23:47:04 +03:00 committed by Alex Zolotarev
parent 17c7d69254
commit 5d224dad06
3 changed files with 11 additions and 14 deletions

View file

@ -74,7 +74,12 @@ namespace yg
glGenFramebuffersFn = &glGenFramebuffers;
glDeleteFramebuffersFn = &glDeleteFramebuffers;
glCheckFramebufferStatusFn = &glCheckFramebufferStatus;
// this extension is defined in headers but absent in library on Android ARM platform
#if defined(OMIM_OS_ANDROID) && defined(__arm__)
glDiscardFramebufferFn = 0;
#else
glDiscardFramebufferFn = &glDiscardFramebufferEXT;
#endif
g_isRenderbufferSupported = g_isFramebufferSupported;

View file

@ -103,10 +103,12 @@ namespace yg
void Renderer::discardFramebuffer(bool doDiscardColor, bool doDiscardDepth)
{
static bool firstReport = true;
if (firstReport && !glDiscardFramebufferFn)
LOG(LINFO, ("GL_EXT_discard_framebuffer is unsupported"));
firstReport = false;
if (firstReport)
{
if (!glDiscardFramebufferFn)
LOG(LINFO, ("GL_EXT_discard_framebuffer is unsupported"));
firstReport = false;
}
if (glDiscardFramebufferFn)
processCommand(make_shared_ptr(new DiscardFramebuffer(doDiscardColor, doDiscardDepth)));

View file

@ -127,13 +127,3 @@ win32* {
SOURCES += internal/opengl_glsl_ext.cpp \
internal/opengl_glsl_impl.cpp
}