From 71b457085870ae4cf24812aebaf6aa35fbc8f49c Mon Sep 17 00:00:00 2001 From: Edwin Jakobs Date: Wed, 26 Aug 2020 00:09:19 +0200 Subject: [PATCH] [orx-mesh-generators] Fix bug from refactor --- orx-mesh-generators/src/main/kotlin/GeneratorBuffer.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/orx-mesh-generators/src/main/kotlin/GeneratorBuffer.kt b/orx-mesh-generators/src/main/kotlin/GeneratorBuffer.kt index 152eb1ab..4bf6c8ac 100644 --- a/orx-mesh-generators/src/main/kotlin/GeneratorBuffer.kt +++ b/orx-mesh-generators/src/main/kotlin/GeneratorBuffer.kt @@ -32,8 +32,8 @@ class GeneratorBuffer { fun toByteBuffer(): ByteBuffer { val bb = ByteBuffer.allocateDirect(data.size * (3 * 4 + 3 * 4 + 2 * 4)) bb.order(ByteOrder.nativeOrder()) - for (d in data) { bb.rewind() + for (d in data) { bb.putFloat(d.position.x.toFloat()) bb.putFloat(d.position.y.toFloat()) bb.putFloat(d.position.z.toFloat())