mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-12 17:07:55 -04:00
dynamic texture array: upload if thread is rendering thread
This commit is contained in:
parent
9e6a5f9188
commit
7a49d20e75
@ -72,7 +72,11 @@ abstract class DynamicTextureArray(
|
||||
val data = creator.invoke()
|
||||
|
||||
this.data = MipmapTextureData(data.size, data.buffer)
|
||||
context.queue += { upload(index, this) }
|
||||
if (Thread.currentThread() == context.thread) {
|
||||
upload(index, this)
|
||||
} else {
|
||||
context.queue += { upload(index, this) }
|
||||
}
|
||||
}
|
||||
|
||||
fun pushRaw(identifier: Any, async: Boolean = true, creator: () -> ByteArray): DynamicTexture {
|
||||
|
Loading…
x
Reference in New Issue
Block a user