mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-18 11:54:59 -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
|
* 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.
|
* 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 array = value.array
|
||||||
|
|
||||||
val offset = this.id * Mat4.length
|
val offset = this.id * Mat4.length
|
||||||
for (index in 0 until Mat4.length) {
|
buffer.position(offset)
|
||||||
buffer.put(offset + index, array[index])
|
buffer.put(array, 0, Mat4.length)
|
||||||
}
|
|
||||||
|
|
||||||
for (child in this.array) {
|
for (child in this.array) {
|
||||||
child.pack(buffer)
|
child.pack(buffer)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user