From 4d56eda147a635eefef1a68d3c786b32e7ca90e9 Mon Sep 17 00:00:00 2001 From: Mattia Iavarone Date: Tue, 10 Sep 2019 12:29:19 +0200 Subject: [PATCH] Fix texture distortion bug (#9) --- CHANGELOG.md | 9 ++++++++- README.md | 2 +- library/build.gradle | 2 +- .../java/com/otaliastudios/opengl/draw/Gl2dDrawable.kt | 4 ++-- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a22476c..9c5cde5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,10 @@ -### v0.3.0 +### v0.3.1 + +- Fixes a bug in texture program ([#9][9]) + +https://github.com/natario1/Egloo/compare/v0.3.0...v0.3.1 + +## v0.3.0 - Support for non-rect shapes in textures ([#8][8]) @@ -31,3 +37,4 @@ https://github.com/natario1/Egloo/compare/v0.2.1...v0.2.2 [5]: https://github.com/natario1/Egloo/pull/5 [7]: https://github.com/natario1/Egloo/pull/7 [8]: https://github.com/natario1/Egloo/pull/8 +[9]: https://github.com/natario1/Egloo/pull/9 diff --git a/README.md b/README.md index 0e4c7d7..db1a2a5 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ with respect to a typical object-oriented context. Egloo tries to take some of t by creating a **thin**, flexible layer of abstraction around EGL and GLES calls. ```groovy -implementation 'com.otaliastudios.opengl:egloo:0.3.0' +implementation 'com.otaliastudios.opengl:egloo:0.3.1' ``` ⠀ diff --git a/library/build.gradle b/library/build.gradle index f43a6db..6266757 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -5,7 +5,7 @@ apply plugin: 'com.github.dcendents.android-maven' apply plugin: 'com.jfrog.bintray' ext { - libVersion = '0.3.0' + libVersion = '0.3.1' libGroup = 'com.otaliastudios.opengl' libName = 'Egloo' libDescription = 'Simple and lightweight OpenGL ES drawing and EGL management for Android, with object-oriented components based on Google\'s Grafika.' diff --git a/library/src/main/java/com/otaliastudios/opengl/draw/Gl2dDrawable.kt b/library/src/main/java/com/otaliastudios/opengl/draw/Gl2dDrawable.kt index c8165e1..f2645c4 100644 --- a/library/src/main/java/com/otaliastudios/opengl/draw/Gl2dDrawable.kt +++ b/library/src/main/java/com/otaliastudios/opengl/draw/Gl2dDrawable.kt @@ -9,10 +9,10 @@ abstract class Gl2dDrawable: GlDrawable() { final override val coordsPerVertex = 2 fun getBounds(rect: RectF) { - var top = Float.MIN_VALUE + var top = -Float.MAX_VALUE // not MIN_VALUE! var bottom = Float.MAX_VALUE var left = Float.MAX_VALUE - var right = Float.MIN_VALUE + var right = -Float.MAX_VALUE var count = 0 while (vertexArray.hasRemaining()) { val value = vertexArray.get()