diff options
Diffstat (limited to 'examples/web/models/models_mesh_picking.c')
| -rw-r--r-- | examples/web/models/models_mesh_picking.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/examples/web/models/models_mesh_picking.c b/examples/web/models/models_mesh_picking.c index d659e2d..3a85221 100644 --- a/examples/web/models/models_mesh_picking.c +++ b/examples/web/models/models_mesh_picking.c @@ -19,6 +19,10 @@ #include <emscripten/emscripten.h> #endif +#if defined(PLATFORM_ANDROID) + #include "android_native_app_glue.h" +#endif + //---------------------------------------------------------------------------------- // Global Variables Definition //---------------------------------------------------------------------------------- @@ -55,14 +59,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 //-------------------------------------------------------------------------------------- - int screenWidth = 800; - int screenHeight = 450; - +#if defined(PLATFORM_ANDROID) + InitWindow(screenWidth, screenHeight, app); +#else InitWindow(screenWidth, screenHeight, "raylib [models] example - 3d mesh picking"); +#endif // Define the camera to look into our 3d world camera.position = (Vector3){ 10.0f, 8.0f, 10.0f }; // Camera position @@ -101,8 +110,9 @@ int main() CloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- - +#if !defined(PLATFORM_ANDROID) return 0; +#endif } //---------------------------------------------------------------------------------- |
