mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-10 16:01:50 -04:00
render system: set blending=false by default
This commit is contained in:
parent
980492bc1b
commit
ae63181159
@ -145,7 +145,7 @@ class HUDRenderer(
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun setup() {
|
private fun setup() {
|
||||||
renderWindow.renderSystem.reset()
|
renderWindow.renderSystem.reset(blending = true)
|
||||||
renderWindow.renderSystem.clear(IntegratedBufferTypes.DEPTH_BUFFER)
|
renderWindow.renderSystem.clear(IntegratedBufferTypes.DEPTH_BUFFER)
|
||||||
shader.use()
|
shader.use()
|
||||||
}
|
}
|
||||||
|
@ -35,7 +35,7 @@ interface RenderSystem {
|
|||||||
|
|
||||||
fun reset(
|
fun reset(
|
||||||
depthTest: Boolean = true,
|
depthTest: Boolean = true,
|
||||||
blending: Boolean = true,
|
blending: Boolean = false,
|
||||||
faceCulling: Boolean = true,
|
faceCulling: Boolean = true,
|
||||||
depthMask: Boolean = true,
|
depthMask: Boolean = true,
|
||||||
sourceAlpha: BlendingFunctions = BlendingFunctions.SOURCE_ALPHA,
|
sourceAlpha: BlendingFunctions = BlendingFunctions.SOURCE_ALPHA,
|
||||||
|
@ -7,7 +7,7 @@ interface OpaqueDrawable : Renderer {
|
|||||||
get() = false
|
get() = false
|
||||||
|
|
||||||
fun setupOpaque() {
|
fun setupOpaque() {
|
||||||
renderSystem.reset(blending = false)
|
renderSystem.reset()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun drawOpaque()
|
fun drawOpaque()
|
||||||
|
@ -8,7 +8,7 @@ interface TranslucentDrawable : Renderer {
|
|||||||
get() = false
|
get() = false
|
||||||
|
|
||||||
fun setupTranslucent() {
|
fun setupTranslucent() {
|
||||||
renderSystem.reset(depthMask = false) // ToDo: This is just a translucent workaround
|
renderSystem.reset(depthMask = false, blending = true) // ToDo: This is just a translucent workaround
|
||||||
renderSystem.setBlendFunc(BlendingFunctions.SOURCE_ALPHA, BlendingFunctions.ONE_MINUS_SOURCE_ALPHA, BlendingFunctions.ONE, BlendingFunctions.ONE_MINUS_SOURCE_ALPHA)
|
renderSystem.setBlendFunc(BlendingFunctions.SOURCE_ALPHA, BlendingFunctions.ONE_MINUS_SOURCE_ALPHA, BlendingFunctions.ONE, BlendingFunctions.ONE_MINUS_SOURCE_ALPHA)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ interface TransparentDrawable : Renderer {
|
|||||||
get() = false
|
get() = false
|
||||||
|
|
||||||
fun setupTransparent() {
|
fun setupTransparent() {
|
||||||
renderSystem.reset(blending = false)
|
renderSystem.reset()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun drawTransparent()
|
fun drawTransparent()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user