From 6a1440a4507c019641dcb553a42e00caf9065db0 Mon Sep 17 00:00:00 2001 From: Mykhailo Shchurov Date: Thu, 8 Dec 2016 01:13:22 +0200 Subject: [PATCH] delta time calc fix --- particleview/build.gradle | 4 ++-- .../com/github/shchurov/particleview/ParticleRenderer.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/particleview/build.gradle b/particleview/build.gradle index 7ba83e6..3db2bed 100644 --- a/particleview/build.gradle +++ b/particleview/build.gradle @@ -10,8 +10,8 @@ android { defaultConfig { minSdkVersion 14 targetSdkVersion 25 - versionCode 1 - versionName "1.0" + versionCode 3 + versionName "0.9.3" } buildTypes { release { diff --git a/particleview/src/main/java/com/github/shchurov/particleview/ParticleRenderer.java b/particleview/src/main/java/com/github/shchurov/particleview/ParticleRenderer.java index 847a9f2..32672be 100644 --- a/particleview/src/main/java/com/github/shchurov/particleview/ParticleRenderer.java +++ b/particleview/src/main/java/com/github/shchurov/particleview/ParticleRenderer.java @@ -164,12 +164,12 @@ public void onDrawFrame(GL10 unused) { lastUpdateTime = time; } particleSystem.update((time - lastUpdateTime) / NANOSECONDS); + lastUpdateTime = time; updateBuffers(particleSystem.getParticles()); render(particleSystem.getParticles().size()); if (fpsLogEnabled) { logFps(); } - lastUpdateTime = time; } private void logFps() {