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