diff options
| author | Ray San <[email protected]> | 2017-11-03 20:01:48 +0100 |
|---|---|---|
| committer | Ray San <[email protected]> | 2017-11-03 20:01:48 +0100 |
| commit | d918334a2e1ce32961c0797a4b13fdd5b4ce5630 (patch) | |
| tree | 1f16feb32953200c2a47cf425352f1bba70ab99a /examples/web/core/core_3d_picking.c | |
| parent | e4041e4eb8c55db0a37c8af575c7a98c17963a9a (diff) | |
| download | raylib.com-d918334a2e1ce32961c0797a4b13fdd5b4ce5630.tar.gz raylib.com-d918334a2e1ce32961c0797a4b13fdd5b4ce5630.zip | |
Updated to support Android platform
Diffstat (limited to 'examples/web/core/core_3d_picking.c')
| -rw-r--r-- | examples/web/core/core_3d_picking.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/examples/web/core/core_3d_picking.c b/examples/web/core/core_3d_picking.c index 2934c3f..96cdab6 100644 --- a/examples/web/core/core_3d_picking.c +++ b/examples/web/core/core_3d_picking.c @@ -15,6 +15,10 @@ #include <emscripten/emscripten.h> #endif +#if defined(PLATFORM_ANDROID) + #include "android_native_app_glue.h" +#endif + //---------------------------------------------------------------------------------- // Global Variables Definition //---------------------------------------------------------------------------------- @@ -39,12 +43,20 @@ 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 [core] example - 3d picking"); - +#endif + camera.position = (Vector3){ 10.0f, 10.0f, 10.0f }; // Camera position camera.target = (Vector3){ 0.0f, 0.0f, 0.0f }; // Camera looking at point camera.up = (Vector3){ 0.0f, 1.0f, 0.0f }; // Camera up vector (rotation towards target) @@ -69,8 +81,9 @@ int main() //-------------------------------------------------------------------------------------- CloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- - +#if !defined(PLATFORM_ANDROID) return 0; +#endif } //---------------------------------------------------------------------------------- |
