From 9f18ed9a3ce7045753b72a86bf141b294f128bc1 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Wed, 16 Dec 2015 16:29:37 -0800 Subject: [PATCH] [android] Add CustomLayerRenderParameters to example code --- platform/android/mapboxgl-app.gypi | 4 ++++ platform/android/src/example_custom_layer.cpp | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/platform/android/mapboxgl-app.gypi b/platform/android/mapboxgl-app.gypi index 1c2f8f3b3..128a5ebba 100644 --- a/platform/android/mapboxgl-app.gypi +++ b/platform/android/mapboxgl-app.gypi @@ -72,6 +72,10 @@ './src/example_custom_layer.cpp', ], + 'include_dirs': [ + '../../include', + ], + 'variables': { 'ldflags': [ '-llog', diff --git a/platform/android/src/example_custom_layer.cpp b/platform/android/src/example_custom_layer.cpp index e85354535..a58b05758 100644 --- a/platform/android/src/example_custom_layer.cpp +++ b/platform/android/src/example_custom_layer.cpp @@ -1,6 +1,8 @@ #include #include +#include + static const GLchar * vertexShaderSource = "attribute vec2 a_pos; void main() { gl_Position = vec4(a_pos, 0, 1); }"; static const GLchar * fragmentShaderSource = "void main() { gl_FragColor = vec4(0, 1, 0, 1); }"; @@ -62,7 +64,7 @@ void nativeInitialize(void *context) { reinterpret_cast(context)->initialize(); } -void nativeRender(void *context) { +void nativeRender(void *context, const mbgl::CustomLayerRenderParameters& /*parameters*/) { reinterpret_cast(context)->render(); }