mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-16 08:36:07 +09:00
messing around w/ GL blend equations, think got something working...
Former-commit-id: 6c9bb1a9d49c9ea0a5f8a68f4b2d05b0d8390b96 Former-commit-id: 7947f3b32dbe0d17a7bd206b3fd8850fdf3ea9c1
This commit is contained in:
@@ -8,8 +8,7 @@ import net.torvald.JsonFetcher
|
|||||||
import net.torvald.JsonWriter
|
import net.torvald.JsonWriter
|
||||||
import net.torvald.imagefont.TinyAlphNum
|
import net.torvald.imagefont.TinyAlphNum
|
||||||
import org.lwjgl.input.Controllers
|
import org.lwjgl.input.Controllers
|
||||||
import org.lwjgl.opengl.GL11
|
import org.lwjgl.opengl.*
|
||||||
import org.lwjgl.opengl.GL20
|
|
||||||
import org.newdawn.slick.*
|
import org.newdawn.slick.*
|
||||||
import org.newdawn.slick.state.StateBasedGame
|
import org.newdawn.slick.state.StateBasedGame
|
||||||
import java.io.File
|
import java.io.File
|
||||||
@@ -112,10 +111,10 @@ constructor(gamename: String) : StateBasedGame(gamename) {
|
|||||||
//addState(StateSplash())
|
//addState(StateSplash())
|
||||||
//addState(StateMonitorCheck())
|
//addState(StateMonitorCheck())
|
||||||
//addState(StateFontTester())
|
//addState(StateFontTester())
|
||||||
addState(StateNoiseTexGen())
|
//addState(StateNoiseTexGen())
|
||||||
|
|
||||||
//ingame = StateInGame()
|
ingame = StateInGame()
|
||||||
//addState(ingame)
|
addState(ingame)
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
@@ -442,7 +441,13 @@ fun blendMul() {
|
|||||||
fun blendNormal() {
|
fun blendNormal() {
|
||||||
GL11.glEnable(GL11.GL_BLEND)
|
GL11.glEnable(GL11.GL_BLEND)
|
||||||
GL11.glColorMask(true, true, true, true)
|
GL11.glColorMask(true, true, true, true)
|
||||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA)
|
//GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA)
|
||||||
|
|
||||||
|
// TODO seems working as intended (no more whitened-out semitransparent colour), but needs further investigation
|
||||||
|
GL14.glBlendFuncSeparate(
|
||||||
|
GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA,
|
||||||
|
GL11.GL_ONE, GL11.GL_ONE_MINUS_SRC_ALPHA
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun blendAlphaMap() {
|
fun blendAlphaMap() {
|
||||||
|
|||||||
Reference in New Issue
Block a user