aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/phenax/utils/program.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/phenax/utils/program.kt')
-rw-r--r--src/main/kotlin/phenax/utils/program.kt9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/main/kotlin/phenax/utils/program.kt b/src/main/kotlin/phenax/utils/program.kt
index d3788ea..ced3e3a 100644
--- a/src/main/kotlin/phenax/utils/program.kt
+++ b/src/main/kotlin/phenax/utils/program.kt
@@ -8,11 +8,6 @@ import org.openrndr.draw.*
import org.openrndr.extra.filewatcher.watchingFile
import org.openrndr.extra.olive.oliveProgram as oliveProgramOriginal
-enum class ActionType {
- PAN,
- LIGHT_MOVE
-}
-
fun Int.seconds(): Int = this * 1000
fun Int.minutes(): Int = this.seconds() * 60
@@ -51,7 +46,7 @@ fun preprocessShader(shaderCode: String): String {
parts.add(shaderCode.slice(lastIndex..(it.range.first - 1)))
lastIndex = it.range.last + 1
val modulePath = it.groupValues[1]
- val moduleContents = File("src/main/resources/shaders/modules/${modulePath}.cs").readText()
+ val moduleContents = File("src/main/resources/shaders/modules/${modulePath}.glsl").readText()
parts.add("/* Module ${modulePath} */")
parts.add(moduleContents)
parts.add("/* End module ${modulePath} */")
@@ -64,7 +59,7 @@ val defaultShaderCode: String = ""
fun Program.liveComputeShader(name: String): ReadOnlyProperty<Any?, ComputeShader> {
val shaderCode by
- watchingFile(File("src/main/resources/shaders/${name}.cs")) { file ->
+ watchingFile(File("src/main/resources/shaders/${name}.glsl")) { file ->
println("change")
preprocessShader(file.readText().toString())
}