mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-17 11:24:56 -04:00
network: 1.17.1-pre3, 1.17.1-rc1
This commit is contained in:
parent
ab17e2697d
commit
54b23bd6c2
@ -19,7 +19,6 @@ import de.bixilon.minosoft.gui.rendering.RenderWindow
|
||||
import de.bixilon.minosoft.gui.rendering.exceptions.ShaderLoadingException
|
||||
import de.bixilon.minosoft.gui.rendering.system.base.shader.Shader
|
||||
import de.bixilon.minosoft.gui.rendering.system.base.shader.code.glsl.GLSLShaderCode
|
||||
import de.bixilon.minosoft.gui.rendering.util.OpenGLUtil
|
||||
import glm_.mat4x4.Mat4
|
||||
import glm_.vec2.Vec2
|
||||
import glm_.vec3.Vec3
|
||||
@ -61,7 +60,7 @@ class OpenGLShader(
|
||||
glCompileShaderARB(program)
|
||||
|
||||
if (glGetObjectParameteriARB(program, GL_OBJECT_COMPILE_STATUS_ARB) == GL_FALSE) {
|
||||
throw ShaderLoadingException(OpenGLUtil.getLogInfo(program))
|
||||
throw ShaderLoadingException(getInfoLog(program))
|
||||
}
|
||||
|
||||
return program
|
||||
@ -97,13 +96,13 @@ class OpenGLShader(
|
||||
glLinkProgramARB(shader)
|
||||
|
||||
if (glGetObjectParameteriARB(shader, GL_OBJECT_LINK_STATUS_ARB) == GL_FALSE) {
|
||||
throw ShaderLoadingException(OpenGLUtil.getLogInfo(shader))
|
||||
throw ShaderLoadingException(getInfoLog(shader))
|
||||
}
|
||||
|
||||
glValidateProgramARB(shader)
|
||||
|
||||
if (glGetObjectParameteriARB(shader, GL_OBJECT_VALIDATE_STATUS_ARB) == GL_FALSE) {
|
||||
throw ShaderLoadingException(OpenGLUtil.getLogInfo(shader))
|
||||
throw ShaderLoadingException(getInfoLog(shader))
|
||||
}
|
||||
for (program in programs) {
|
||||
glDeleteShader(program)
|
||||
@ -143,8 +142,7 @@ class OpenGLShader(
|
||||
|
||||
override fun setArray(uniformName: String, array: Array<*>) {
|
||||
for ((i, value) in array.withIndex()) {
|
||||
val currentUniformName = "$uniformName[$i]"
|
||||
this[currentUniformName] = value
|
||||
this["$uniformName[$i]"] = value
|
||||
}
|
||||
}
|
||||
|
||||
@ -166,4 +164,11 @@ class OpenGLShader(
|
||||
|
||||
override val log: String
|
||||
get() = TODO()
|
||||
|
||||
private companion object {
|
||||
|
||||
fun getInfoLog(program: Int): String {
|
||||
return glGetInfoLogARB(program, glGetObjectParameteriARB(program, GL_OBJECT_INFO_LOG_LENGTH_ARB))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,23 +0,0 @@
|
||||
/*
|
||||
* Minosoft
|
||||
* Copyright (C) 2020 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 distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* This software is not affiliated with Mojang AB, the original developer of Minecraft.
|
||||
*/
|
||||
|
||||
package de.bixilon.minosoft.gui.rendering.util
|
||||
|
||||
import org.lwjgl.opengl.ARBShaderObjects.*
|
||||
|
||||
object OpenGLUtil {
|
||||
|
||||
fun getLogInfo(`object`: Int): String {
|
||||
return glGetInfoLogARB(`object`, glGetObjectParameteriARB(`object`, GL_OBJECT_INFO_LOG_LENGTH_ARB))
|
||||
}
|
||||
}
|
@ -19,12 +19,13 @@ import de.bixilon.minosoft.protocol.network.connection.PlayConnection
|
||||
import de.bixilon.minosoft.protocol.packets.s2c.PlayS2CPacket
|
||||
import de.bixilon.minosoft.protocol.protocol.PlayInByteBuffer
|
||||
import de.bixilon.minosoft.protocol.protocol.ProtocolVersions
|
||||
import de.bixilon.minosoft.protocol.protocol.ProtocolVersions.V_1_17_1_RC1
|
||||
import de.bixilon.minosoft.util.logging.Log
|
||||
import de.bixilon.minosoft.util.logging.LogLevels
|
||||
import de.bixilon.minosoft.util.logging.LogMessageType
|
||||
|
||||
class EntityDestroyS2CP(buffer: PlayInByteBuffer) : PlayS2CPacket() {
|
||||
val entityIds: List<Int> = if (buffer.versionId < ProtocolVersions.V_21W17A) {
|
||||
val entityIds: List<Int> = if (buffer.versionId < ProtocolVersions.V_21W17A || buffer.versionId >= V_1_17_1_RC1) {
|
||||
buffer.readEntityIdArray(if (buffer.versionId < ProtocolVersions.V_14W04A) {
|
||||
buffer.readUnsignedByte()
|
||||
} else {
|
||||
|
@ -16,6 +16,8 @@ package de.bixilon.minosoft.protocol.protocol;
|
||||
@SuppressWarnings("unused")
|
||||
public class ProtocolVersions {
|
||||
public static final int
|
||||
V_1_17_1_RC1 = 792,
|
||||
V_1_17_1_PRE_3 = 791,
|
||||
V_1_17_1_PRE_2 = 790,
|
||||
V_1_17_1_PRE_1 = 789,
|
||||
V_1_17 = 788,
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user