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:
authorDarafei Praliaskouski <komzpa@gmail.com>2013-09-27 15:00:54 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:02:56 +0300
commit7220ddfa3cd71469d3cf884921524ad531c521eb (patch)
treec3f306dacfce6b2679cd68f2b32f11976605b650 /drape
parentf4efe3c808955d8bafea6d1b09b9fce8f8ed8b9b (diff)
[drape] fixed linux compilation
Diffstat (limited to 'drape')
-rw-r--r--drape/attribute_provider.cpp2
-rw-r--r--drape/glIncludes.hpp22
-rw-r--r--drape/glfunctions.cpp11
-rw-r--r--drape/pointers.hpp2
-rw-r--r--drape/shader_reference.hpp1
-rw-r--r--drape/texture.hpp1
-rw-r--r--drape/uniform_value.cpp1
-rw-r--r--drape/uniform_value.hpp1
8 files changed, 24 insertions, 17 deletions
diff --git a/drape/attribute_provider.cpp b/drape/attribute_provider.cpp
index 3c0af9f2f4..fbeb4827df 100644
--- a/drape/attribute_provider.cpp
+++ b/drape/attribute_provider.cpp
@@ -6,7 +6,7 @@
#define CHECK_STREAMS CheckStreams()
#define INIT_STREAM(x) InitStream((x))
#else
- #include "macros.hpp"
+ #include "../../base/macros.hpp"
#define INIT_CHECK_INFO(x) UNUSED_VALUE((x))
#define CHECK_STREAMS
#define INIT_STREAM(x) UNUSED_VALUE((x))
diff --git a/drape/glIncludes.hpp b/drape/glIncludes.hpp
index 32e937510e..226d916bba 100644
--- a/drape/glIncludes.hpp
+++ b/drape/glIncludes.hpp
@@ -1,19 +1,15 @@
#pragma once
-#if defined(__APPLE__)
- #include <TargetConditionals.h>
- #if (TARGET_OS_IPHONE > 0)
- #define USE_OPENGLES20_IF_AVAILABLE 1
- #include <OpenGLES/ES2/gl.h>
- #define OGL_IOS
- #else
- #include <OpenGL/gl.h>
- #include <OpenGL/glext.h>
- #define OGL_MAC
- #endif
-#elif
+#include "../std/target_os.hpp"
+
+#if defined(OMIM_OS_IPHONE)
+ #define USE_OPENGLES20_IF_AVAILABLE 1
+ #include <OpenGLES/ES2/gl.h>
+#elif defined(OMIM_OS_MAC)
+ #include <OpenGL/gl.h>
+ #include <OpenGL/glext.h>
+#else
#define GL_GLEXT_PROTOTYPES
#include <GL/gl.h>
#include <GL/glext.h>
- #define OGL_ANDROID
#endif
diff --git a/drape/glfunctions.cpp b/drape/glfunctions.cpp
index 476a844dc8..b325800fc2 100644
--- a/drape/glfunctions.cpp
+++ b/drape/glfunctions.cpp
@@ -1,6 +1,9 @@
#include "glfunctions.hpp"
#include "glIncludes.hpp"
#include "../base/assert.hpp"
+#include "../base/logging.hpp"
+
+#include <cstring>
namespace
{
@@ -69,11 +72,15 @@ namespace
void GLFunctions::Init()
{
/// VAO
-#if defined(OGL_MAC)
+#if defined(OMIM_OS_MAC)
glGenVertexArraysFn = &glGenVertexArraysAPPLE;
glBindVertexArrayFn = &glBindVertexArrayAPPLE;
glDeleteVertexArrayFn = &glDeleteVertexArraysAPPLE;
-#elif defined(OGL_IOS) || defined(OGL_ANDROID)
+#elif defined(OMIM_OS_LINUX)
+ glGenVertexArraysFn = &::glGenVertexArrays;
+ glBindVertexArrayFn = &::glBindVertexArray;
+ glDeleteVertexArrayFn = &::glDeleteVertexArrays;
+#elif defined(OMIM_OS_MOBILE)
glGenVertexArraysFn = &glGenVertexArraysOES;
glBindVertexArrayFn = &glBindVertexArrayOES;
glDeleteVertexArrayFn = &glDeleteVertexArraysOES;
diff --git a/drape/pointers.hpp b/drape/pointers.hpp
index 0edadc764d..5e0aa667de 100644
--- a/drape/pointers.hpp
+++ b/drape/pointers.hpp
@@ -1,6 +1,6 @@
#pragma once
-#include <cassert>
+#include "../std/memcpy.hpp"
template <typename T>
class ReferencePoiner
diff --git a/drape/shader_reference.hpp b/drape/shader_reference.hpp
index 7b56293747..e05dede218 100644
--- a/drape/shader_reference.hpp
+++ b/drape/shader_reference.hpp
@@ -1,6 +1,7 @@
#pragma once
#include "../std/string.hpp"
+#include "../std/stdint.hpp"
class ShaderReference
{
diff --git a/drape/texture.hpp b/drape/texture.hpp
index 4d18f11163..44507b9d5b 100644
--- a/drape/texture.hpp
+++ b/drape/texture.hpp
@@ -3,6 +3,7 @@
#include "pointers.hpp"
#include "../std/string.hpp"
+#include "../std/stdint.hpp"
struct TextureInfo
{
diff --git a/drape/uniform_value.cpp b/drape/uniform_value.cpp
index e29856f39c..dd88c86c55 100644
--- a/drape/uniform_value.cpp
+++ b/drape/uniform_value.cpp
@@ -1,6 +1,7 @@
#include "uniform_value.hpp"
#include "glfunctions.hpp"
#include "../base/assert.hpp"
+#include "../std/memcpy.hpp"
namespace
{
diff --git a/drape/uniform_value.hpp b/drape/uniform_value.hpp
index d8174047bb..1e7eaac48d 100644
--- a/drape/uniform_value.hpp
+++ b/drape/uniform_value.hpp
@@ -5,6 +5,7 @@
#include "../std/string.hpp"
#include "../std/shared_array.hpp"
+#include "../std/memcpy.hpp"
class UniformValue
{