Fix compile error for OpenGL ES
This commit is contained in:
parent
4f3be92208
commit
ea0d5f3d81
|
@ -2,6 +2,7 @@ minimapWidget = nil
|
|||
minimapButton = nil
|
||||
minimapWindow = nil
|
||||
otmm = true
|
||||
preloaded = false
|
||||
|
||||
function init()
|
||||
minimapButton = modules.client_topmenu.addRightGameToggleButton('minimapButton', tr('Minimap') .. ' (Ctrl+M)', '/images/topbuttons/minimap', toggle)
|
||||
|
@ -66,8 +67,13 @@ function onMiniWindowClose()
|
|||
minimapButton:setOn(false)
|
||||
end
|
||||
|
||||
function preload()
|
||||
loadMap(false)
|
||||
preloaded = true
|
||||
end
|
||||
|
||||
function online()
|
||||
loadMap()
|
||||
loadMap(not preloaded)
|
||||
minimapWidget:followLocalPlayer()
|
||||
end
|
||||
|
||||
|
@ -75,9 +81,12 @@ function offline()
|
|||
saveMap()
|
||||
end
|
||||
|
||||
function loadMap()
|
||||
function loadMap(clean)
|
||||
local protocolVersion = g_game.getProtocolVersion()
|
||||
|
||||
if clean then
|
||||
g_minimap.clean()
|
||||
end
|
||||
|
||||
if otmm then
|
||||
local minimapFile = '/minimap.otmm'
|
||||
|
|
|
@ -360,9 +360,9 @@ bool Graphics::canUseBlendFuncSeparate()
|
|||
bool Graphics::canUseBlendEquation()
|
||||
{
|
||||
#if OPENGL_ES==2
|
||||
return true;
|
||||
return false;
|
||||
#elif OPENGL_ES==1
|
||||
return true;
|
||||
return false;
|
||||
#else
|
||||
if(!GLEW_VERSION_1_4)
|
||||
return false;
|
||||
|
|
|
@ -289,14 +289,7 @@ void Painter::updateGlBlendEquation()
|
|||
{
|
||||
if(!g_graphics.canUseBlendEquation())
|
||||
return;
|
||||
switch(m_blendEquation) {
|
||||
case BlendEquation_Max:
|
||||
glBlendEquation(GL_MAX);
|
||||
break;
|
||||
case BlendEquation_Add:
|
||||
glBlendEquation(GL_FUNC_ADD);
|
||||
break;
|
||||
}
|
||||
glBlendEquation(m_blendEquation);
|
||||
}
|
||||
|
||||
void Painter::updateGlClipRect()
|
||||
|
|
|
@ -44,8 +44,8 @@ public:
|
|||
TriangleStrip = GL_TRIANGLE_STRIP
|
||||
};
|
||||
enum BlendEquation {
|
||||
BlendEquation_Add,
|
||||
BlendEquation_Max,
|
||||
BlendEquation_Add = 0x8006, // GL_FUNC_ADD
|
||||
BlendEquation_Max = 0x8008, // GL_MAX
|
||||
};
|
||||
|
||||
struct PainterState {
|
||||
|
|
Loading…
Reference in New Issue