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
diff options
context:
space:
mode:
authorDaria Volvenkova <d.volvenkova@corp.mail.ru>2018-10-02 18:24:43 +0300
committerVladimir Byko-Ianko <bykoianko@gmail.com>2018-10-04 13:57:58 +0300
commit63548b973f57a453a3299fc31e72f9f7a0d93d7c (patch)
tree6263b8aaab9f62dba3ed5eddf071f889697b4b5a /drape/render_state.cpp
parent0b8b83c8ff49d731218013aba599c630a21fa7c5 (diff)
Fixed Xcode compilation for MacOS.
Diffstat (limited to 'drape/render_state.cpp')
-rw-r--r--drape/render_state.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/drape/render_state.cpp b/drape/render_state.cpp
index b12752b868..311e7bc4a2 100644
--- a/drape/render_state.cpp
+++ b/drape/render_state.cpp
@@ -1,11 +1,10 @@
#include "drape/render_state.hpp"
+#include "drape/drape_global.hpp"
#include "drape/gl_functions.hpp"
#include "drape/gl_gpu_program.hpp"
#include "base/buffer_vector.hpp"
-#include "std/target_os.hpp"
-
namespace dp
{
namespace
@@ -14,7 +13,7 @@ std::string const kColorTextureName = "u_colorTex";
std::string const kMaskTextureName = "u_maskTex";
} // namespace
-#if defined(OMIM_OS_IPHONE) && !defined(OMIM_OS_IPHONE_SIMULATOR)
+#if defined(OMIM_METAL_AVAILABLE)
// Definitions of these methods are in a .mm-file.
extern void ApplyDepthStencilStateForMetal(ref_ptr<GraphicsContext> context);
extern void ApplyPipelineStateForMetal(ref_ptr<GraphicsContext> context, ref_ptr<GpuProgram> program,
@@ -220,7 +219,7 @@ void TextureState::ApplyTextures(ref_ptr<GraphicsContext> context, RenderState c
}
else if (apiVersion == dp::ApiVersion::Metal)
{
-#if defined(OMIM_OS_IPHONE) && !defined(OMIM_OS_IPHONE_SIMULATOR)
+#if defined(OMIM_METAL_AVAILABLE)
ApplyTexturesForMetal(context, program, state);
#endif
}
@@ -245,7 +244,7 @@ void ApplyState(ref_ptr<GraphicsContext> context, ref_ptr<GpuProgram> program, R
if (apiVersion == dp::ApiVersion::Metal)
{
// For Metal rendering blending state is a part of the pipeline state.
-#if defined(OMIM_OS_IPHONE) && !defined(OMIM_OS_IPHONE_SIMULATOR)
+#if defined(OMIM_METAL_AVAILABLE)
ApplyPipelineStateForMetal(context, program, state.GetBlending().m_isEnabled);
#endif
}
@@ -261,7 +260,7 @@ void ApplyState(ref_ptr<GraphicsContext> context, ref_ptr<GpuProgram> program, R
if (apiVersion == dp::ApiVersion::Metal)
{
// For Metal rendering we have to apply depth-stencil state after SetX functions calls.
-#if defined(OMIM_OS_IPHONE) && !defined(OMIM_OS_IPHONE_SIMULATOR)
+#if defined(OMIM_METAL_AVAILABLE)
ApplyDepthStencilStateForMetal(context);
#endif
}