Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,7 @@ internal class ManagedGlState(
}
if (curr.blendState != blendState) {
curr.blendState = blendState
@Suppress("DEPRECATION")
blendState.activate()
blendState.activateWithoutChangingMcBlendState()
}
if (curr.colorMask != colorMask) {
curr.colorMask = colorMask
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class URenderPipeline private constructor(
//$$ val prevBlendState = BlendState.active()
//$$ shaderProgram.bind()
//$$ shaderProgram.unbind()
//$$ UGraphics.Globals.blendState(prevBlendState)
//$$ prevBlendState.activateWithoutChangingMcBlendState()
//$$ }
//#endif
}
Expand Down
2 changes: 2 additions & 0 deletions src/main/kotlin/gg/essential/universal/shader/BlendState.kt
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ data class BlendState(
fun activate() = applyState()
//#endif

internal fun activateWithoutChangingMcBlendState() = applyState()

@Suppress("DEPRECATION")
private fun applyState() {
if (enabled) {
Expand Down
Loading