q&d hack to circumvent the dangling pointer issue #26

This commit is contained in:
minjaesong
2019-06-25 15:22:24 +09:00
parent 44405111eb
commit d2e886aec2
4 changed files with 15 additions and 2 deletions

View File

@@ -12,6 +12,7 @@ import net.torvald.terrarum.AppLoader.printdbg
*/
open class BlockLayer(val width: Int, val height: Int) : Disposable {
// using unsafe pointer gets you 100 fps, whereas using directbytebuffer gets you 90
private val ptr = UnsafeHelper.allocate(width * height * BYTES_PER_BLOCK)
//private val directByteBuffer: ByteBuffer