From 7a00d64a193fbd15b89a732d226771344b77fed8 Mon Sep 17 00:00:00 2001 From: pelya Date: Fri, 10 Sep 2010 12:01:05 +0300 Subject: [PATCH] Seems that glClear is not really needed, removing it speeds up things a bit on Android --- .../jni/application/teeworlds/src/engine/client/ec_gfx.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/project/jni/application/teeworlds/src/engine/client/ec_gfx.cpp b/project/jni/application/teeworlds/src/engine/client/ec_gfx.cpp index 15a98d927..b2af71346 100644 --- a/project/jni/application/teeworlds/src/engine/client/ec_gfx.cpp +++ b/project/jni/application/teeworlds/src/engine/client/ec_gfx.cpp @@ -975,8 +975,10 @@ void gfx_swap() perf_end(); } + #ifndef ANDROID if(render_enable && config.gfx_finish) glFinish(); + #endif } void gfx_screenshot_direct(const char *filename) @@ -1044,8 +1046,10 @@ void gfx_texture_set(int slot) void gfx_clear(float r, float g, float b) { if(no_gfx) return; + #ifndef ANDROID glClearColor(r,g,b,0.0f); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + #endif } void gfx_mapscreen(float tl_x, float tl_y, float br_x, float br_y)