diff options
Diffstat (limited to 'include/llmr/platform')
-rw-r--r-- | include/llmr/platform/gl.hpp | 4 | ||||
-rw-r--r-- | include/llmr/platform/platform.hpp | 10 |
2 files changed, 6 insertions, 8 deletions
diff --git a/include/llmr/platform/gl.hpp b/include/llmr/platform/gl.hpp index 4074fa081a..a0d059c756 100644 --- a/include/llmr/platform/gl.hpp +++ b/include/llmr/platform/gl.hpp @@ -1,9 +1,7 @@ #ifndef LLMR_RENDERER_GL #define LLMR_RENDERER_GL -#ifdef EMSCRIPTEN - #include <GLES2/gl2.h> -#elif __APPLE__ +#if __APPLE__ #include "TargetConditionals.h" #if TARGET_OS_IPHONE #include <OpenGLES/ES2/gl.h> diff --git a/include/llmr/platform/platform.hpp b/include/llmr/platform/platform.hpp index f56e738ffa..25778c5610 100644 --- a/include/llmr/platform/platform.hpp +++ b/include/llmr/platform/platform.hpp @@ -6,7 +6,7 @@ #include <string> #define kTileURL "http://a.gl-api-us-east-1.tilestream.net/v3/mapbox.mapbox-streets-v4/%d/%d/%d.gl.pbf" -#define kSpriteURL "http://mapbox-kkaefer.s3.amazonaws.com/static/sprite" +#define kSpriteURL "https://dl.dropboxusercontent.com/u/575564/sprite" namespace llmr { @@ -14,16 +14,16 @@ class Tile; namespace platform { -// Restarts painting. This could for example trigger the event loop of the -// controlling application. -void restart(void *obj); +// Restarts painting. This could for example trigger the event loop of the controlling application. +void restart(); struct Response { int16_t code = -1; std::string body; }; -void request_http(std::string url, std::function<void(Response&)> func, std::function<void()> cb); +// Makes an HTTP request of a URL on a background thread, calls a function with the results on the same thread, and finally calls a callback function on the main thread. +void request_http(std::string url, std::function<void(Response&)> background_function, std::function<void()> foreground_callback); // Returns a relative timestamp in seconds. This value must be monotonic. double time(); |