diff options
| author | Ray San <[email protected]> | 2017-11-06 14:19:36 +0100 |
|---|---|---|
| committer | Ray San <[email protected]> | 2017-11-06 14:19:36 +0100 |
| commit | d27a373c8f23071f5f463552b0c056a38aaed4b2 (patch) | |
| tree | 28fd73b4b699a148a692d2fd75dc2ceca218b870 /examples/web/models/models_obj_loading.c | |
| parent | d918334a2e1ce32961c0797a4b13fdd5b4ce5630 (diff) | |
| download | raylib.com-d27a373c8f23071f5f463552b0c056a38aaed4b2.tar.gz raylib.com-d27a373c8f23071f5f463552b0c056a38aaed4b2.zip | |
Examples reviewed to compile for Android
Diffstat (limited to 'examples/web/models/models_obj_loading.c')
| -rw-r--r-- | examples/web/models/models_obj_loading.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/examples/web/models/models_obj_loading.c b/examples/web/models/models_obj_loading.c index f58a3ad..1e11bdd 100644 --- a/examples/web/models/models_obj_loading.c +++ b/examples/web/models/models_obj_loading.c @@ -15,6 +15,10 @@ #include <emscripten/emscripten.h> #endif +#if defined(PLATFORM_ANDROID) + #include "android_native_app_glue.h" +#endif + //---------------------------------------------------------------------------------- // Global Variables Definition //---------------------------------------------------------------------------------- @@ -37,11 +41,19 @@ void UpdateDrawFrame(void); // Update and Draw one frame //---------------------------------------------------------------------------------- // Main Enry Point //---------------------------------------------------------------------------------- -int main() +#if defined(PLATFORM_ANDROID) +void android_main(struct android_app *app) +#else +int main(void) +#endif { // Initialization //-------------------------------------------------------------------------------------- +#if defined(PLATFORM_ANDROID) + InitWindow(screenWidth, screenHeight, app); +#else InitWindow(screenWidth, screenHeight, "raylib [models] example - obj model loading"); +#endif dwarf = LoadModel("resources/model/dwarf.obj"); // Load OBJ model texture = LoadTexture("resources/model/dwarf_diffuse.png"); // Load model texture @@ -67,8 +79,9 @@ int main() CloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- - +#if !defined(PLATFORM_ANDROID) return 0; +#endif } //---------------------------------------------------------------------------------- |
