mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-15 02:15:34 -04:00
rendering: fix texture animations
This commit is contained in:
parent
d9bdd66fd1
commit
046c9b3b4b
@ -223,7 +223,7 @@ class RenderWindow(
|
||||
// Make the OpenGL context current
|
||||
glfwMakeContextCurrent(windowId)
|
||||
// Enable v-sync
|
||||
glfwSwapInterval(0)
|
||||
glfwSwapInterval(1)
|
||||
|
||||
|
||||
// Make the window visible
|
||||
|
@ -372,8 +372,8 @@ class WorldRenderer(
|
||||
return divided
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private operator fun Int.plus(upOrDown: Directions): Int {
|
||||
return this + upOrDown.directionVector.y.toInt()
|
||||
private operator fun Int.plus(upOrDown: Directions): Int {
|
||||
return this + upOrDown.directionVector.y
|
||||
}
|
||||
}
|
||||
|
@ -10,14 +10,9 @@
|
||||
*
|
||||
* This software is not affiliated with Mojang AB, the original developer of Minecraft.
|
||||
*/
|
||||
package de.bixilon.minosoft.gui.rendering.exceptions
|
||||
|
||||
package de.bixilon.minosoft.gui.rendering.exceptions;
|
||||
|
||||
public class ShaderLoadingException extends Exception {
|
||||
public ShaderLoadingException() {
|
||||
}
|
||||
|
||||
public ShaderLoadingException(String message) {
|
||||
super(message);
|
||||
}
|
||||
class ShaderLoadingException : Exception {
|
||||
constructor()
|
||||
constructor(message: String) : super(message)
|
||||
}
|
@ -208,8 +208,8 @@ class TextureArray(val allTextures: MutableList<Texture>) {
|
||||
|
||||
val arrayOffset = textureAnimation.animationProperties.animationId * INTS_PER_ANIMATED_TEXTURE
|
||||
|
||||
animatedData[arrayOffset] = baseAnimatedData or currentFrame.index
|
||||
animatedData[arrayOffset + 1] = baseAnimatedData or nextFrame.index
|
||||
animatedData[arrayOffset] = baseAnimatedData + currentFrame.index
|
||||
animatedData[arrayOffset + 1] = baseAnimatedData + nextFrame.index
|
||||
animatedData[arrayOffset + 2] = interpolation.toInt()
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user