Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/drape
diff options
context:
space:
mode:
authorExMix <rahuba.youri@mapswithme.com>2014-11-18 11:09:52 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:32:52 +0300
commitba05a5cdc474cb455a30f39efca4e04fb150d7de (patch)
treeec7a83f0c903dc540873f9d1f204e81c7fd74548 /drape
parented45d5f91462d27deea5b8b62dbbb38021fcf676 (diff)
[ios, drape] build fix
Diffstat (limited to 'drape')
-rw-r--r--drape/glIncludes.hpp1
-rw-r--r--drape/glfunctions.cpp17
-rw-r--r--drape/glfunctions.hpp2
3 files changed, 16 insertions, 4 deletions
diff --git a/drape/glIncludes.hpp b/drape/glIncludes.hpp
index 421bc8bf4f..50264aa900 100644
--- a/drape/glIncludes.hpp
+++ b/drape/glIncludes.hpp
@@ -5,6 +5,7 @@
#if defined(OMIM_OS_IPHONE)
#define USE_OPENGLES20_IF_AVAILABLE 1
#include <OpenGLES/ES2/gl.h>
+ #include <OpenGLES/ES2/glext.h>
#elif defined(OMIM_OS_MAC)
#include <OpenGL/gl.h>
#include <OpenGL/glext.h>
diff --git a/drape/glfunctions.cpp b/drape/glfunctions.cpp
index 6f58c24ea9..d412c3db41 100644
--- a/drape/glfunctions.cpp
+++ b/drape/glfunctions.cpp
@@ -115,14 +115,20 @@ void GLFunctions::Init()
glGenVertexArraysFn = &glGenVertexArraysAPPLE;
glBindVertexArrayFn = &glBindVertexArrayAPPLE;
glDeleteVertexArrayFn = &glDeleteVertexArraysAPPLE;
+ glMapBufferFn = &::glMapBuffer;
+ glUnmapBufferFn = &::glUnmapBuffer;
#elif defined(OMIM_OS_LINUX)
glGenVertexArraysFn = &::glGenVertexArrays;
glBindVertexArrayFn = &::glBindVertexArray;
glDeleteVertexArrayFn = &::glDeleteVertexArrays;
+ glMapBufferFn = &::glMapBuffer; // I don't know correct name for linux!
+ glUnmapBufferFn = &::glUnmapBuffer; // I don't know correct name for linux!
#elif defined(OMIM_OS_MOBILE)
glGenVertexArraysFn = &glGenVertexArraysOES;
glBindVertexArrayFn = &glBindVertexArrayOES;
glDeleteVertexArrayFn = &glDeleteVertexArraysOES;
+ glMapBufferFn = &::glMapBufferOES;
+ glUnmapBufferFn = &::glUnmapBufferOES;
#endif
glBindFramebufferFn = &::glBindFramebuffer;
@@ -138,8 +144,6 @@ void GLFunctions::Init()
glDeleteBuffersFn = &::glDeleteBuffers;
glBufferDataFn = &::glBufferData;
glBufferSubDataFn = &::glBufferSubData;
- glMapBufferFn = &::glMapBuffer;
- glUnmapBufferFn = &::glUnmapBuffer;
/// Shaders
glCreateShaderFn = &::glCreateShader;
@@ -180,6 +184,9 @@ void GLFunctions::Init()
glUniform1fvFn = &::glUniform1fv;
glUniformMatrix4fvFn = &glUniformMatrix4fv;
+
+ glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
+ glPixelStorei(GL_PACK_ALIGNMENT, 1);
}
bool GLFunctions::glHasExtension(string const & name)
@@ -246,9 +253,13 @@ void GLFunctions::glDisable(glConst mode)
GLCHECK(::glDisable(mode));
}
-void GLFunctions::glClearDepth(double depth)
+void GLFunctions::glClearDepthValue(double depth)
{
+#ifdef OMIM_OS_IPHONE
+ GLCHECK(::glClearDepthf(static_cast<GLclampf>(depth)));
+#else
GLCHECK(::glClearDepth(depth));
+#endif
}
void GLFunctions::glDepthMask(bool needWriteToDepthBuffer)
diff --git a/drape/glfunctions.hpp b/drape/glfunctions.hpp
index 9c0cbff0f5..b8396ce175 100644
--- a/drape/glfunctions.hpp
+++ b/drape/glfunctions.hpp
@@ -19,7 +19,7 @@ public:
static void glEnable(glConst mode);
static void glDisable(glConst mode);
- static void glClearDepth(double depth);
+ static void glClearDepthValue(double depth);
static void glDepthMask(bool needWriteToDepthBuffer);
static void glDepthFunc(glConst depthFunc);
static void glBlendEquation(glConst function);