diff options
author | Thunderblade73 <85900443+Thunderblade73@users.noreply.github.com> | 2024-02-10 00:24:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-10 00:24:52 +0100 |
commit | 4559e5ff05e19817a21ae49f1c0d8a97d273f6a1 (patch) | |
tree | e72dac91d07fc84bea80548c89e13276caa68b81 /src/main/java/at/hannibal2/skyhanni/utils/shader | |
parent | d3a7cc4ab970b457b7950489da781539e45e0dce (diff) | |
download | skyhanni-4559e5ff05e19817a21ae49f1c0d8a97d273f6a1.tar.gz skyhanni-4559e5ff05e19817a21ae49f1c0d8a97d273f6a1.tar.bz2 skyhanni-4559e5ff05e19817a21ae49f1c0d8a97d273f6a1.zip |
Splitting many utils functions from LorenzUtils up into other classes: ChatUtils, CollectionUtils, ConditionalUtils. And code cleanup #978
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils/shader')
3 files changed, 7 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/shader/ShaderHelper.kt b/src/main/java/at/hannibal2/skyhanni/utils/shader/ShaderHelper.kt index 2576b4248..6f24d0e89 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/shader/ShaderHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/shader/ShaderHelper.kt @@ -17,7 +17,9 @@ import org.lwjgl.opengl.GLContext * Credit: [ShaderHelper.java](https://github.com/BiscuitDevelopment/SkyblockAddons/blob/main/src/main/java/codes/biscuit/skyblockaddons/shader/ShaderHelper.java) */ class ShaderHelper { + companion object { + private var SHADERS_SUPPORTED: Boolean private var USING_ARB_SHADERS: Boolean diff --git a/src/main/java/at/hannibal2/skyhanni/utils/shader/ShaderManager.kt b/src/main/java/at/hannibal2/skyhanni/utils/shader/ShaderManager.kt index 3dbec3c6e..6df5c92f8 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/shader/ShaderManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/shader/ShaderManager.kt @@ -18,9 +18,11 @@ object ShaderManager { * in the when expression */ enum class Shaders(val shader: Shader) { + CHROMA(ChromaShader.INSTANCE); companion object { + fun getShaderInstance(shaderName: String): Shader? = when (shaderName) { "chroma" -> CHROMA.shader else -> { diff --git a/src/main/java/at/hannibal2/skyhanni/utils/shader/Uniform.kt b/src/main/java/at/hannibal2/skyhanni/utils/shader/Uniform.kt index d57398ea4..c9602d423 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/shader/Uniform.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/shader/Uniform.kt @@ -1,6 +1,6 @@ package at.hannibal2.skyhanni.utils.shader -import java.util.* +import java.util.Objects import java.util.function.Supplier /** @@ -14,11 +14,12 @@ class Uniform<T>( shader: Shader, private val uniformType: UniformType<T>, val name: String, - private val uniformValuesSupplier: Supplier<T> + private val uniformValuesSupplier: Supplier<T>, ) { class UniformType<T> { companion object { + val FLOAT: UniformType<Float> = UniformType() val VEC3: UniformType<FloatArray> = UniformType() val BOOL: UniformType<Boolean> = UniformType() |