diff --git a/src/main/kotlin/ru/dbotthepony/kstarbound/client/StarboundClient.kt b/src/main/kotlin/ru/dbotthepony/kstarbound/client/StarboundClient.kt index a925853e..93271034 100644 --- a/src/main/kotlin/ru/dbotthepony/kstarbound/client/StarboundClient.kt +++ b/src/main/kotlin/ru/dbotthepony/kstarbound/client/StarboundClient.kt @@ -9,7 +9,7 @@ import org.lwjgl.glfw.GLFW import org.lwjgl.glfw.GLFWErrorCallback import org.lwjgl.opengl.GL import org.lwjgl.opengl.GL11 -import org.lwjgl.opengl.GL46.* +import org.lwjgl.opengl.GL45.* import org.lwjgl.opengl.GLCapabilities import org.lwjgl.system.MemoryStack import org.lwjgl.system.MemoryUtil diff --git a/src/main/kotlin/ru/dbotthepony/kstarbound/client/gl/BufferObject.kt b/src/main/kotlin/ru/dbotthepony/kstarbound/client/gl/BufferObject.kt index 66090c6d..0a1d9e70 100644 --- a/src/main/kotlin/ru/dbotthepony/kstarbound/client/gl/BufferObject.kt +++ b/src/main/kotlin/ru/dbotthepony/kstarbound/client/gl/BufferObject.kt @@ -1,6 +1,6 @@ package ru.dbotthepony.kstarbound.client.gl -import org.lwjgl.opengl.GL46.* +import org.lwjgl.opengl.GL45.* import org.lwjgl.system.MemoryUtil import ru.dbotthepony.kstarbound.client.StarboundClient import java.nio.ByteBuffer diff --git a/src/main/kotlin/ru/dbotthepony/kstarbound/client/gl/ErrorCheck.kt b/src/main/kotlin/ru/dbotthepony/kstarbound/client/gl/ErrorCheck.kt index 63123764..b3bee180 100644 --- a/src/main/kotlin/ru/dbotthepony/kstarbound/client/gl/ErrorCheck.kt +++ b/src/main/kotlin/ru/dbotthepony/kstarbound/client/gl/ErrorCheck.kt @@ -1,6 +1,6 @@ package ru.dbotthepony.kstarbound.client.gl -import org.lwjgl.opengl.GL46.* +import org.lwjgl.opengl.GL45.* // GL_INVALID_ENUM // GL_INVALID_VALUE diff --git a/src/main/kotlin/ru/dbotthepony/kstarbound/client/gl/GLFrameBuffer.kt b/src/main/kotlin/ru/dbotthepony/kstarbound/client/gl/GLFrameBuffer.kt index f9e9921d..26f62ec5 100644 --- a/src/main/kotlin/ru/dbotthepony/kstarbound/client/gl/GLFrameBuffer.kt +++ b/src/main/kotlin/ru/dbotthepony/kstarbound/client/gl/GLFrameBuffer.kt @@ -8,16 +8,16 @@ import org.lwjgl.opengl.GL30.GL_RGB import org.lwjgl.opengl.GL30.GL_TEXTURE_2D import org.lwjgl.opengl.GL30.glFramebufferTexture2D import org.lwjgl.opengl.GL45.glCheckNamedFramebufferStatus -import org.lwjgl.opengl.GL46 +import org.lwjgl.opengl.GL45 import ru.dbotthepony.kstarbound.client.StarboundClient class GLFrameBuffer : GLObject() { override val client = StarboundClient.current() - override val pointer = GL46.glGenFramebuffers() + override val pointer = GL45.glGenFramebuffers() init { checkForGLError("Creating framebuffer") - client.registerCleanable(this, GL46::glDeleteFramebuffers, pointer) + client.registerCleanable(this, GL45::glDeleteFramebuffers, pointer) } val isComplete: Boolean get() { diff --git a/src/main/kotlin/ru/dbotthepony/kstarbound/client/gl/GLTexture.kt b/src/main/kotlin/ru/dbotthepony/kstarbound/client/gl/GLTexture.kt index 7714dcd8..2e7ae594 100644 --- a/src/main/kotlin/ru/dbotthepony/kstarbound/client/gl/GLTexture.kt +++ b/src/main/kotlin/ru/dbotthepony/kstarbound/client/gl/GLTexture.kt @@ -1,7 +1,7 @@ package ru.dbotthepony.kstarbound.client.gl import org.apache.logging.log4j.LogManager -import org.lwjgl.opengl.GL46.* +import org.lwjgl.opengl.GL45.* import org.lwjgl.stb.STBImage import ru.dbotthepony.kstarbound.client.StarboundClient import ru.dbotthepony.kstarbound.defs.image.Image diff --git a/src/main/kotlin/ru/dbotthepony/kstarbound/client/gl/GLType.kt b/src/main/kotlin/ru/dbotthepony/kstarbound/client/gl/GLType.kt index df194f72..51b189b5 100644 --- a/src/main/kotlin/ru/dbotthepony/kstarbound/client/gl/GLType.kt +++ b/src/main/kotlin/ru/dbotthepony/kstarbound/client/gl/GLType.kt @@ -1,6 +1,6 @@ package ru.dbotthepony.kstarbound.client.gl -import org.lwjgl.opengl.GL46.* +import org.lwjgl.opengl.GL45.* enum class GLType( val identity: Int, diff --git a/src/main/kotlin/ru/dbotthepony/kstarbound/client/gl/VertexArrayObject.kt b/src/main/kotlin/ru/dbotthepony/kstarbound/client/gl/VertexArrayObject.kt index 65861536..1a8594ee 100644 --- a/src/main/kotlin/ru/dbotthepony/kstarbound/client/gl/VertexArrayObject.kt +++ b/src/main/kotlin/ru/dbotthepony/kstarbound/client/gl/VertexArrayObject.kt @@ -1,6 +1,6 @@ package ru.dbotthepony.kstarbound.client.gl -import org.lwjgl.opengl.GL46.* +import org.lwjgl.opengl.GL45.* import ru.dbotthepony.kstarbound.client.StarboundClient class VertexArrayObject : GLObject() { diff --git a/src/main/kotlin/ru/dbotthepony/kstarbound/client/gl/shader/GLShaderProgram.kt b/src/main/kotlin/ru/dbotthepony/kstarbound/client/gl/shader/GLShaderProgram.kt index e3baf94b..d59d6836 100644 --- a/src/main/kotlin/ru/dbotthepony/kstarbound/client/gl/shader/GLShaderProgram.kt +++ b/src/main/kotlin/ru/dbotthepony/kstarbound/client/gl/shader/GLShaderProgram.kt @@ -4,7 +4,7 @@ import it.unimi.dsi.fastutil.objects.Object2BooleanArrayMap import it.unimi.dsi.fastutil.objects.Object2BooleanFunction import it.unimi.dsi.fastutil.objects.Object2ObjectArrayMap import it.unimi.dsi.fastutil.objects.Object2ObjectFunction -import org.lwjgl.opengl.GL46.* +import org.lwjgl.opengl.GL45.* import ru.dbotthepony.kstarbound.client.StarboundClient import ru.dbotthepony.kstarbound.client.gl.GLObject import ru.dbotthepony.kstarbound.client.gl.checkForGLError diff --git a/src/main/kotlin/ru/dbotthepony/kstarbound/client/gl/vertex/StreamVertexBuilder.kt b/src/main/kotlin/ru/dbotthepony/kstarbound/client/gl/vertex/StreamVertexBuilder.kt index f4eedf99..03fe8181 100644 --- a/src/main/kotlin/ru/dbotthepony/kstarbound/client/gl/vertex/StreamVertexBuilder.kt +++ b/src/main/kotlin/ru/dbotthepony/kstarbound/client/gl/vertex/StreamVertexBuilder.kt @@ -1,6 +1,6 @@ package ru.dbotthepony.kstarbound.client.gl.vertex -import org.lwjgl.opengl.GL46 +import org.lwjgl.opengl.GL45 import ru.dbotthepony.kstarbound.client.StarboundClient import ru.dbotthepony.kstarbound.client.gl.VertexArrayObject import ru.dbotthepony.kstarbound.client.gl.BufferObject @@ -32,16 +32,16 @@ class StreamVertexBuilder( ebo.unbind() } - fun upload(drawType: Int = GL46.GL_DYNAMIC_DRAW) { + fun upload(drawType: Int = GL45.GL_DYNAMIC_DRAW) { builder.upload(vbo, ebo, drawType) } fun bind() = vao.bind() fun unbind() = vao.unbind() - fun draw(primitives: Int = GL46.GL_TRIANGLES) { + fun draw(primitives: Int = GL45.GL_TRIANGLES) { bind() - GL46.glDrawElements(primitives, builder.indexCount, builder.indexType, 0L) + GL45.glDrawElements(primitives, builder.indexCount, builder.indexType, 0L) checkForGLError() } diff --git a/src/main/kotlin/ru/dbotthepony/kstarbound/client/gl/vertex/VertexBuilder.kt b/src/main/kotlin/ru/dbotthepony/kstarbound/client/gl/vertex/VertexBuilder.kt index 72c188fb..0ec04554 100644 --- a/src/main/kotlin/ru/dbotthepony/kstarbound/client/gl/vertex/VertexBuilder.kt +++ b/src/main/kotlin/ru/dbotthepony/kstarbound/client/gl/vertex/VertexBuilder.kt @@ -1,9 +1,9 @@ package ru.dbotthepony.kstarbound.client.gl.vertex -import org.lwjgl.opengl.GL46 -import org.lwjgl.opengl.GL46.GL_UNSIGNED_INT -import org.lwjgl.opengl.GL46.GL_UNSIGNED_SHORT -import org.lwjgl.opengl.GL46.GL_UNSIGNED_BYTE +import org.lwjgl.opengl.GL45 +import org.lwjgl.opengl.GL45.GL_UNSIGNED_INT +import org.lwjgl.opengl.GL45.GL_UNSIGNED_SHORT +import org.lwjgl.opengl.GL45.GL_UNSIGNED_BYTE import ru.dbotthepony.kstarbound.client.gl.GLType import ru.dbotthepony.kstarbound.client.gl.BufferObject import ru.dbotthepony.kvector.util2d.AABB @@ -220,7 +220,7 @@ class VertexBuilder( return this } - fun upload(vbo: BufferObject.VBO, ebo: BufferObject.EBO, drawType: Int = GL46.GL_DYNAMIC_DRAW) { + fun upload(vbo: BufferObject.VBO, ebo: BufferObject.EBO, drawType: Int = GL45.GL_DYNAMIC_DRAW) { end() check(elementVertices == 0) { "Not fully built vertex element ($mode requires ${mode?.elements} vertex points to be present, yet last strip has only $elementVertices elements)" } diff --git a/src/main/kotlin/ru/dbotthepony/kstarbound/client/render/Box2DRenderer.kt b/src/main/kotlin/ru/dbotthepony/kstarbound/client/render/Box2DRenderer.kt index 149b2301..eb78e65d 100644 --- a/src/main/kotlin/ru/dbotthepony/kstarbound/client/render/Box2DRenderer.kt +++ b/src/main/kotlin/ru/dbotthepony/kstarbound/client/render/Box2DRenderer.kt @@ -1,6 +1,6 @@ package ru.dbotthepony.kstarbound.client.render -import org.lwjgl.opengl.GL46.* +import org.lwjgl.opengl.GL45.* import ru.dbotthepony.kbox2d.api.IDebugDraw import ru.dbotthepony.kbox2d.api.Transform import ru.dbotthepony.kstarbound.PIXELS_IN_STARBOUND_UNIT diff --git a/src/main/kotlin/ru/dbotthepony/kstarbound/client/render/Font.kt b/src/main/kotlin/ru/dbotthepony/kstarbound/client/render/Font.kt index bef841a0..147d3501 100644 --- a/src/main/kotlin/ru/dbotthepony/kstarbound/client/render/Font.kt +++ b/src/main/kotlin/ru/dbotthepony/kstarbound/client/render/Font.kt @@ -2,7 +2,7 @@ package ru.dbotthepony.kstarbound.client.render import it.unimi.dsi.fastutil.chars.Char2ObjectArrayMap import it.unimi.dsi.fastutil.objects.Object2ObjectFunction -import org.lwjgl.opengl.GL46.* +import org.lwjgl.opengl.GL45.* import ru.dbotthepony.kstarbound.client.StarboundClient import ru.dbotthepony.kstarbound.client.freetype.LoadFlag import ru.dbotthepony.kstarbound.client.gl.* diff --git a/src/main/kotlin/ru/dbotthepony/kstarbound/client/render/Mesh.kt b/src/main/kotlin/ru/dbotthepony/kstarbound/client/render/Mesh.kt index a33e20a5..a3e2951e 100644 --- a/src/main/kotlin/ru/dbotthepony/kstarbound/client/render/Mesh.kt +++ b/src/main/kotlin/ru/dbotthepony/kstarbound/client/render/Mesh.kt @@ -1,6 +1,6 @@ package ru.dbotthepony.kstarbound.client.render -import org.lwjgl.opengl.GL46 +import org.lwjgl.opengl.GL45 import ru.dbotthepony.kstarbound.client.StarboundClient import ru.dbotthepony.kstarbound.client.gl.checkForGLError import ru.dbotthepony.kstarbound.client.gl.shader.GLShaderProgram @@ -9,7 +9,7 @@ import ru.dbotthepony.kvector.arrays.Matrix4f class Mesh() { constructor(builder: VertexBuilder) : this() { - load(builder, GL46.GL_STATIC_DRAW) + load(builder, GL45.GL_STATIC_DRAW) } val state = StarboundClient.current() @@ -23,7 +23,7 @@ class Mesh() { var indexType = 0 private set - fun load(builder: VertexBuilder, mode: Int = GL46.GL_DYNAMIC_DRAW) { + fun load(builder: VertexBuilder, mode: Int = GL45.GL_DYNAMIC_DRAW) { vao.bind() vbo.bind() ebo.bind() @@ -41,7 +41,7 @@ class Mesh() { fun render() { vao.bind() - GL46.glDrawElements(GL46.GL_TRIANGLES, indexCount, indexType, 0L) + GL45.glDrawElements(GL45.GL_TRIANGLES, indexCount, indexType, 0L) checkForGLError() vao.unbind() } diff --git a/src/main/kotlin/ru/dbotthepony/kstarbound/client/render/TileRenderer.kt b/src/main/kotlin/ru/dbotthepony/kstarbound/client/render/TileRenderer.kt index 9dc3414a..3ac2d789 100644 --- a/src/main/kotlin/ru/dbotthepony/kstarbound/client/render/TileRenderer.kt +++ b/src/main/kotlin/ru/dbotthepony/kstarbound/client/render/TileRenderer.kt @@ -1,7 +1,7 @@ package ru.dbotthepony.kstarbound.client.render import org.apache.logging.log4j.LogManager -import org.lwjgl.opengl.GL46.* +import org.lwjgl.opengl.GL45.* import ru.dbotthepony.kstarbound.PIXELS_IN_STARBOUND_UNITf import ru.dbotthepony.kstarbound.Starbound import ru.dbotthepony.kstarbound.client.StarboundClient