render system: rename setBlendFunc to setBlendFunction

This commit is contained in:
Bixilon 2021-12-15 22:20:08 +01:00
parent e14ec86809
commit 95f86982e1
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4
3 changed files with 6 additions and 6 deletions

View File

@ -112,7 +112,7 @@ class SkyRenderer(
}
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()
skySunMesh.draw()
}
@ -137,7 +137,7 @@ class SkyRenderer(
}
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()
skyboxShader.use()
skyboxMesh.draw()

View File

@ -46,7 +46,7 @@ interface RenderSystem {
depth: DepthFunctions = DepthFunctions.LESS,
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.BLENDING] = blending
this[RenderingCapabilities.FACE_CULLING] = faceCulling
@ -63,7 +63,7 @@ interface RenderSystem {
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 depthMask: Boolean

View File

@ -161,8 +161,8 @@ class OpenGLRenderSystem(
glBlendFunc(source.gl, destination.gl)
}
override fun setBlendFunc(sourceRGB: BlendingFunctions, destinationRGB: BlendingFunctions, sourceAlphaFactor: BlendingFunctions, destinationAlphaFactor: BlendingFunctions) {
glBlendFuncSeparate(sourceRGB.gl, destinationRGB.gl, sourceAlphaFactor.gl, destinationAlphaFactor.gl)
override fun setBlendFunction(sourceRGB: BlendingFunctions, destinationRGB: BlendingFunctions, sourceAlpha: BlendingFunctions, destinationAlpha: BlendingFunctions) {
glBlendFuncSeparate(sourceRGB.gl, destinationRGB.gl, sourceAlpha.gl, destinationAlpha.gl)
}
override var depth: DepthFunctions = DepthFunctions.LESS