summaryrefslogtreecommitdiffhomepage
path: root/examples/web/shaders/shaders_postprocessing.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/web/shaders/shaders_postprocessing.c')
-rw-r--r--examples/web/shaders/shaders_postprocessing.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/examples/web/shaders/shaders_postprocessing.c b/examples/web/shaders/shaders_postprocessing.c
index a5e7beb..67207a0 100644
--- a/examples/web/shaders/shaders_postprocessing.c
+++ b/examples/web/shaders/shaders_postprocessing.c
@@ -22,6 +22,10 @@
#include <emscripten/emscripten.h>
#endif
+#if defined(PLATFORM_ANDROID)
+ #include "android_native_app_glue.h"
+#endif
+
#if defined(PLATFORM_DESKTOP)
#define GLSL_VERSION 330
#define DEFAULT_VERTEX_SHADER "resources/shaders/glsl330/base.vs"
@@ -91,12 +95,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
//--------------------------------------------------------------------------------------
SetConfigFlags(FLAG_MSAA_4X_HINT); // Enable Multi Sampling Anti Aliasing 4x (if available)
+#if defined(PLATFORM_ANDROID)
+ InitWindow(screenWidth, screenHeight, app);
+#else
InitWindow(screenWidth, screenHeight, "raylib [shaders] example - postprocessing shader");
+#endif
dwarf = LoadModel("resources/model/dwarf.obj"); // Load OBJ model
texture = LoadTexture("resources/model/dwarf_diffuse.png"); // Load model texture