Fix missing texture not being properly uploaded to memory

This commit is contained in:
DBotThePony 2023-09-23 23:05:40 +07:00
parent 8647d8e74a
commit 5901d756ee
Signed by: DBot
GPG Key ID: DCC23B5715498507

View File

@ -397,7 +397,7 @@ class StarboundClient : Closeable {
}
}
buffer.position()
buffer.position(0)
missingTexture.upload(GL_RGB, GL_UNSIGNED_BYTE, buffer)
}
@ -477,7 +477,7 @@ class StarboundClient : Closeable {
val data = Image.get(it)
if (data == null) {
LOGGER.error("Texture $it is not found, falling back to missing texture")
LOGGER.error("Texture $it is not found!")
missingTexture
} else {
val tex = GLTexture2D(data.width, data.height, when (data.amountOfChannels) {