Fix compile error for OpenGL ES

This commit is contained in:
Eduardo Bart 2013-02-07 03:56:02 -02:00
parent 4f3be92208
commit ea0d5f3d81
4 changed files with 17 additions and 15 deletions

View File

@ -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'

View File

@ -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;

View File

@ -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()

View File

@ -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 {