mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-17 11:24:56 -04:00
skeletal transform packing: don't copy every single float from mat4
Its batched now, the byte buffer can optimize this call.
This commit is contained in:
parent
1d742f4dff
commit
89c8e43e65
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Minosoft
|
||||
* Copyright (C) 2020-2023 Moritz Zwerger
|
||||
* Copyright (C) 2020-2025 Moritz Zwerger
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
@ -48,9 +48,8 @@ class TransformInstance(
|
||||
val array = value.array
|
||||
|
||||
val offset = this.id * Mat4.length
|
||||
for (index in 0 until Mat4.length) {
|
||||
buffer.put(offset + index, array[index])
|
||||
}
|
||||
buffer.position(offset)
|
||||
buffer.put(array, 0, Mat4.length)
|
||||
|
||||
for (child in this.array) {
|
||||
child.pack(buffer)
|
||||
|
Loading…
x
Reference in New Issue
Block a user