From 04916c1b451e4400a496ae210b3faa10154c65ac Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 21 Nov 2012 21:13:31 +0300 Subject: Add batch drawing for any images. Add this drawing to Button. --- src/client.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/client.cpp') diff --git a/src/client.cpp b/src/client.cpp index 0ec0647cb..6ea0ad11f 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -147,6 +147,7 @@ UserPalette *userPalette = nullptr; Graphics *mainGraphics = nullptr; Sound sound; +int openGLMode = 0; static uint32_t nextTick(uint32_t interval, void *param A_UNUSED); static uint32_t nextSecond(uint32_t interval, void *param A_UNUSED); @@ -538,12 +539,14 @@ void Client::gameInit() #endif #ifdef USE_OPENGL + openGLMode = config.getIntValue("opengl"); OpenGLImageHelper::setBlur(config.getBoolValue("blur")); SDLImageHelper::SDLSetEnableAlphaCache(config.getBoolValue("alphaCache") - && !config.getIntValue("opengl")); + && !openGLMode); ImageHelper::setEnableAlpha(config.getFloatValue("guialpha") != 1.0f - || config.getIntValue("opengl")); + || openGLMode); #else + openGLMode = 0; SDLImageHelper::SDLSetEnableAlphaCache(config.getBoolValue("alphaCache")); ImageHelper::setEnableAlpha(config.getFloatValue("guialpha") != 1.0f); #endif -- cgit v1.2.3-60-g2f50