summaryrefslogtreecommitdiffhomepage
path: root/examples/web/models/models_skybox.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/web/models/models_skybox.c')
-rw-r--r--examples/web/models/models_skybox.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/examples/web/models/models_skybox.c b/examples/web/models/models_skybox.c
index 8f2bcfd..364562e 100644
--- a/examples/web/models/models_skybox.c
+++ b/examples/web/models/models_skybox.c
@@ -15,6 +15,10 @@
#include <emscripten/emscripten.h>
#endif
+#if defined(PLATFORM_ANDROID)
+ #include "android_native_app_glue.h"
+#endif
+
//----------------------------------------------------------------------------------
// Global Variables Definition
//----------------------------------------------------------------------------------
@@ -34,11 +38,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 - skybox loading and drawing");
+#endif
// Load skybox model
Mesh cube = GenMeshCube(1.0f, 1.0f, 1.0f);
@@ -79,8 +91,9 @@ int main()
CloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
-
+#if !defined(PLATFORM_ANDROID)
return 0;
+#endif
}
//----------------------------------------------------------------------------------