mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-17 03:15:35 -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.util.mesh.MeshStruct
|
||||
import glm_.vec2.Vec2i
|
||||
import org.lwjgl.system.MemoryUtil.memAllocFloat
|
||||
import java.nio.ByteBuffer
|
||||
import java.nio.FloatBuffer
|
||||
|
||||
@ -88,9 +87,9 @@ interface RenderSystem {
|
||||
|
||||
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 createFloatUniformBuffer(bindingIndex: Int = 0, data: FloatBuffer = memAllocFloat(0)): FloatUniformBuffer
|
||||
fun createFloatUniformBuffer(bindingIndex: Int = 0, data: FloatBuffer): FloatUniformBuffer
|
||||
|
||||
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.system.base.BlendingFunctions
|
||||
import de.bixilon.minosoft.gui.rendering.system.base.RenderingCapabilities
|
||||
|
||||
interface TranslucentDrawable : Renderer {
|
||||
val skipTranslucent: Boolean
|
||||
get() = false
|
||||
|
||||
fun setupTranslucent() {
|
||||
renderSystem.reset(blending = true) // ToDo: This is just a translucent workaround
|
||||
renderSystem.enable(RenderingCapabilities.BLENDING)
|
||||
renderSystem.reset(blending = true)
|
||||
renderSystem.setBlendFunc(BlendingFunctions.SOURCE_ALPHA, BlendingFunctions.ONE_MINUS_SOURCE_ALPHA, BlendingFunctions.ONE, BlendingFunctions.ZERO)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user