From ae93e4f43a605c25d3f28559aeaedf73f0045334 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20=28xq=29=20Quei=C3=9Fner?= Date: Thu, 30 Jul 2020 19:38:59 +0200 Subject: [PATCH] Adds more fancy colors. --- build.zig | 7 ++++--- src/main.zig | 9 ++++++++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/build.zig b/build.zig index 1c8aaa9..a71d8b3 100644 --- a/build.zig +++ b/build.zig @@ -218,9 +218,10 @@ pub fn build(b: *std.build.Builder) !void { }); make_unsigned_apk.step.dependOn(&aarch64_exe.step); - // make_unsigned_apk.step.dependOn(&arm_exe.step); - // // make_unsigned_apk.step.dependOn(&x86_exe.step); - // make_unsigned_apk.step.dependOn(&x86_64_exe.step); + make_unsigned_apk.step.dependOn(&arm_exe.step); + make_unsigned_apk.step.dependOn(&x86_64_exe.step); + + // make_unsigned_apk.step.dependOn(&x86_exe.step); const unpack_apk = b.addSystemCommand(&[_][]const u8{ "unzip", diff --git a/src/main.zig b/src/main.zig index 0881843..fdaa984 100644 --- a/src/main.zig +++ b/src/main.zig @@ -474,7 +474,14 @@ pub const AndroidApp = struct { self.egl_init = false; } - c.glClearColor(0.0, 0.0, 0.0, 1.0); + const t = @intToFloat(f32, loop) / 100.0; + + c.glClearColor( + 0.5 + 0.5 * std.math.sin(t + 0.0), + 0.5 + 0.5 * std.math.sin(t + 1.0), + 0.5 + 0.5 * std.math.sin(t + 2.0), + 1.0, + ); c.glClear(c.GL_COLOR_BUFFER_BIT); c.glUseProgram(program);