Worley noise, Syphon and noise filter parameters...

This commit is contained in:
Rein van der Woerd
2020-02-21 09:25:29 +01:00
committed by edwin
parent 1eaf8607db
commit bb7439db54
15 changed files with 306 additions and 2 deletions

View File

@@ -0,0 +1,38 @@
import jsyphon.JSyphonClient
import jsyphon.JSyphonImage
import org.lwjgl.opengl.GL11C.GL_TEXTURE_2D
import org.openrndr.application
import org.openrndr.color.ColorRGBa
import org.openrndr.draw.*
import org.openrndr.internal.Driver
import org.openrndr.internal.gl3.ColorBufferGL3
import kotlin.math.sin
fun main() = application {
configure {
width = 1000
height = 1000
}
program {
val client = JSyphonClient()
client.init()
extend {
drawer.background(ColorRGBa.RED)
if (client.hasNewFrame()) {
println("hasnewframe")
val img = client.newFrameImageForContext()
val buffer = ColorBufferGL3(GL_TEXTURE_2D, img.textureName(), img.textureWidth(), img.textureHeight(),
1.0, ColorFormat.RGBa, ColorType.UINT8, 1, BufferMultisample.Disabled, Session.active)
drawer.image(buffer)
}
}
}
}

View File

@@ -0,0 +1,20 @@
import org.openrndr.application
import org.openrndr.color.ColorRGBa
import kotlin.math.sin
fun main() = application {
configure {
width = 1000
height = 1000
}
program {
extend(SyphonServer("Test"))
extend {
drawer.background(ColorRGBa.RED)
drawer.circle(width/2.0, height/2.0, sin(seconds) * width / 2.0)
}
}
}