mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-16 19:05:02 -04:00
render system: rename setBlendFunc to setBlendFunction
This commit is contained in:
parent
e14ec86809
commit
95f86982e1
@ -112,7 +112,7 @@ class SkyRenderer(
|
|||||||
|
|
||||||
}
|
}
|
||||||
renderSystem.enable(RenderingCapabilities.BLENDING)
|
renderSystem.enable(RenderingCapabilities.BLENDING)
|
||||||
renderSystem.setBlendFunc(BlendingFunctions.SOURCE_ALPHA, BlendingFunctions.ONE, BlendingFunctions.ONE, BlendingFunctions.ZERO)
|
renderSystem.setBlendFunction(BlendingFunctions.SOURCE_ALPHA, BlendingFunctions.ONE, BlendingFunctions.ONE, BlendingFunctions.ZERO)
|
||||||
skySunShader.use()
|
skySunShader.use()
|
||||||
skySunMesh.draw()
|
skySunMesh.draw()
|
||||||
}
|
}
|
||||||
@ -137,7 +137,7 @@ class SkyRenderer(
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun drawSkybox() {
|
private fun drawSkybox() {
|
||||||
renderSystem.setBlendFunc(BlendingFunctions.SOURCE_ALPHA, BlendingFunctions.ONE_MINUS_SOURCE_ALPHA, BlendingFunctions.ONE, BlendingFunctions.ZERO) // ToDo
|
renderSystem.setBlendFunction(BlendingFunctions.ONE_MINUS_CONSTANT_COLOR, BlendingFunctions.ONE_MINUS_SOURCE_COLOR, BlendingFunctions.ONE, BlendingFunctions.ZERO) // ToDo
|
||||||
checkSkyColor()
|
checkSkyColor()
|
||||||
skyboxShader.use()
|
skyboxShader.use()
|
||||||
skyboxMesh.draw()
|
skyboxMesh.draw()
|
||||||
|
@ -46,7 +46,7 @@ interface RenderSystem {
|
|||||||
depth: DepthFunctions = DepthFunctions.LESS,
|
depth: DepthFunctions = DepthFunctions.LESS,
|
||||||
clearColor: RGBColor = Colors.TRANSPARENT,
|
clearColor: RGBColor = Colors.TRANSPARENT,
|
||||||
) {
|
) {
|
||||||
setBlendFunc(sourceAlpha, destinationAlpha, BlendingFunctions.ONE, BlendingFunctions.ZERO)
|
setBlendFunction(sourceAlpha, destinationAlpha, BlendingFunctions.ONE, BlendingFunctions.ZERO)
|
||||||
this[RenderingCapabilities.DEPTH_TEST] = depthTest
|
this[RenderingCapabilities.DEPTH_TEST] = depthTest
|
||||||
this[RenderingCapabilities.BLENDING] = blending
|
this[RenderingCapabilities.BLENDING] = blending
|
||||||
this[RenderingCapabilities.FACE_CULLING] = faceCulling
|
this[RenderingCapabilities.FACE_CULLING] = faceCulling
|
||||||
@ -63,7 +63,7 @@ interface RenderSystem {
|
|||||||
|
|
||||||
operator fun set(source: BlendingFunctions, destination: BlendingFunctions)
|
operator fun set(source: BlendingFunctions, destination: BlendingFunctions)
|
||||||
|
|
||||||
fun setBlendFunc(sourceRGB: BlendingFunctions, destinationRGB: BlendingFunctions, sourceAlphaFactor: BlendingFunctions, destinationAlphaFactor: BlendingFunctions)
|
fun setBlendFunction(sourceRGB: BlendingFunctions, destinationRGB: BlendingFunctions, sourceAlpha: BlendingFunctions, destinationAlpha: BlendingFunctions)
|
||||||
|
|
||||||
var depth: DepthFunctions
|
var depth: DepthFunctions
|
||||||
var depthMask: Boolean
|
var depthMask: Boolean
|
||||||
|
@ -161,8 +161,8 @@ class OpenGLRenderSystem(
|
|||||||
glBlendFunc(source.gl, destination.gl)
|
glBlendFunc(source.gl, destination.gl)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun setBlendFunc(sourceRGB: BlendingFunctions, destinationRGB: BlendingFunctions, sourceAlphaFactor: BlendingFunctions, destinationAlphaFactor: BlendingFunctions) {
|
override fun setBlendFunction(sourceRGB: BlendingFunctions, destinationRGB: BlendingFunctions, sourceAlpha: BlendingFunctions, destinationAlpha: BlendingFunctions) {
|
||||||
glBlendFuncSeparate(sourceRGB.gl, destinationRGB.gl, sourceAlphaFactor.gl, destinationAlphaFactor.gl)
|
glBlendFuncSeparate(sourceRGB.gl, destinationRGB.gl, sourceAlpha.gl, destinationAlpha.gl)
|
||||||
}
|
}
|
||||||
|
|
||||||
override var depth: DepthFunctions = DepthFunctions.LESS
|
override var depth: DepthFunctions = DepthFunctions.LESS
|
||||||
|
Loading…
x
Reference in New Issue
Block a user