mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-18 03:44:54 -04:00
stuff
This commit is contained in:
parent
1c61ffb440
commit
ce850dc802
@ -24,7 +24,6 @@ import de.bixilon.minosoft.gui.rendering.system.base.shader.Shader
|
|||||||
import de.bixilon.minosoft.gui.rendering.system.base.texture.TextureManager
|
import de.bixilon.minosoft.gui.rendering.system.base.texture.TextureManager
|
||||||
import de.bixilon.minosoft.gui.rendering.util.mesh.MeshStruct
|
import de.bixilon.minosoft.gui.rendering.util.mesh.MeshStruct
|
||||||
import glm_.vec2.Vec2i
|
import glm_.vec2.Vec2i
|
||||||
import org.lwjgl.system.MemoryUtil.memAllocFloat
|
|
||||||
import java.nio.ByteBuffer
|
import java.nio.ByteBuffer
|
||||||
import java.nio.FloatBuffer
|
import java.nio.FloatBuffer
|
||||||
|
|
||||||
@ -88,9 +87,9 @@ interface RenderSystem {
|
|||||||
|
|
||||||
fun createShader(resourceLocation: ResourceLocation): Shader
|
fun createShader(resourceLocation: ResourceLocation): Shader
|
||||||
|
|
||||||
fun createVertexBuffer(structure: MeshStruct, data: FloatBuffer, primitiveType: PrimitiveTypes = PrimitiveTypes.TRIANGLE): FloatVertexBuffer
|
fun createVertexBuffer(structure: MeshStruct, data: FloatBuffer, primitiveType: PrimitiveTypes = preferredPrimitiveType): FloatVertexBuffer
|
||||||
fun createIntUniformBuffer(bindingIndex: Int = 0, data: IntArray = IntArray(0)): IntUniformBuffer
|
fun createIntUniformBuffer(bindingIndex: Int = 0, data: IntArray = IntArray(0)): IntUniformBuffer
|
||||||
fun createFloatUniformBuffer(bindingIndex: Int = 0, data: FloatBuffer = memAllocFloat(0)): FloatUniformBuffer
|
fun createFloatUniformBuffer(bindingIndex: Int = 0, data: FloatBuffer): FloatUniformBuffer
|
||||||
|
|
||||||
fun createTextureManager(): TextureManager
|
fun createTextureManager(): TextureManager
|
||||||
|
|
||||||
|
@ -2,15 +2,13 @@ package de.bixilon.minosoft.gui.rendering.system.base.phases
|
|||||||
|
|
||||||
import de.bixilon.minosoft.gui.rendering.Renderer
|
import de.bixilon.minosoft.gui.rendering.Renderer
|
||||||
import de.bixilon.minosoft.gui.rendering.system.base.BlendingFunctions
|
import de.bixilon.minosoft.gui.rendering.system.base.BlendingFunctions
|
||||||
import de.bixilon.minosoft.gui.rendering.system.base.RenderingCapabilities
|
|
||||||
|
|
||||||
interface TranslucentDrawable : Renderer {
|
interface TranslucentDrawable : Renderer {
|
||||||
val skipTranslucent: Boolean
|
val skipTranslucent: Boolean
|
||||||
get() = false
|
get() = false
|
||||||
|
|
||||||
fun setupTranslucent() {
|
fun setupTranslucent() {
|
||||||
renderSystem.reset(blending = true) // ToDo: This is just a translucent workaround
|
renderSystem.reset(blending = true)
|
||||||
renderSystem.enable(RenderingCapabilities.BLENDING)
|
|
||||||
renderSystem.setBlendFunc(BlendingFunctions.SOURCE_ALPHA, BlendingFunctions.ONE_MINUS_SOURCE_ALPHA, BlendingFunctions.ONE, BlendingFunctions.ZERO)
|
renderSystem.setBlendFunc(BlendingFunctions.SOURCE_ALPHA, BlendingFunctions.ONE_MINUS_SOURCE_ALPHA, BlendingFunctions.ONE, BlendingFunctions.ZERO)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user