diff options
author | r.kuznetsov <r.kuznetsov@corp.mail.ru> | 2018-09-05 15:20:10 +0300 |
---|---|---|
committer | Aleksey Belousov <beloal@users.noreply.github.com> | 2018-09-25 12:33:08 +0300 |
commit | d1074729e0d0c63ab887efb866903bc99181f919 (patch) | |
tree | f1d70b92271c7c09eae2293a2b233572730be13c /drape/render_state.cpp | |
parent | a81f1fc4d1f698a0f0aaaa1e7a29f41516b05d11 (diff) |
[drape][metal] Fixed unit tests, refactored a bit CurrentApiVersion.
Diffstat (limited to 'drape/render_state.cpp')
-rw-r--r-- | drape/render_state.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drape/render_state.cpp b/drape/render_state.cpp index 0da8a47e3c..a9b409080c 100644 --- a/drape/render_state.cpp +++ b/drape/render_state.cpp @@ -16,6 +16,8 @@ std::string const kMaskTextureName = "u_maskTex"; extern void ApplyDepthStencilStateForMetal(ref_ptr<GraphicsContext> context); extern void ApplyPipelineStateForMetal(ref_ptr<GraphicsContext> context, ref_ptr<GpuProgram> program, bool blendingEnabled); +extern void ApplyTexturesForMetal(ref_ptr<GraphicsContext> context, ref_ptr<GpuProgram> program, + RenderState const & state); #endif // static @@ -213,7 +215,16 @@ void TextureState::ApplyTextures(ref_ptr<GraphicsContext> context, RenderState c } } } - //TODO(@rokuz,@darina): Metal? + else if (apiVersion == dp::ApiVersion::Metal) + { +#if defined(OMIM_OS_IPHONE) + ApplyTexturesForMetal(context, program, state); +#endif + } + else + { + CHECK(false, ("Unsupported API version.")); + } } uint8_t TextureState::GetLastUsedSlots() |