Bump to OPENRNDR 0.3.43-rc.5
This commit is contained in:
22
openrndr-demos/build.gradle
Normal file
22
openrndr-demos/build.gradle
Normal file
@@ -0,0 +1,22 @@
|
||||
sourceSets {
|
||||
demo {
|
||||
java {
|
||||
srcDirs = ["src/demo/kotlin"]
|
||||
compileClasspath += main.getCompileClasspath()
|
||||
runtimeClasspath += main.getRuntimeClasspath()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def boofcvVersion = "0.34"
|
||||
|
||||
dependencies {
|
||||
demoImplementation(project(":orx-mesh-generators"))
|
||||
demoImplementation(project(":orx-camera"))
|
||||
|
||||
demoImplementation("org.openrndr:openrndr-core:$openrndrVersion")
|
||||
demoImplementation("org.openrndr:openrndr-extensions:$openrndrVersion")
|
||||
demoRuntimeOnly("org.openrndr:openrndr-gl3:$openrndrVersion")
|
||||
demoRuntimeOnly("org.openrndr:openrndr-gl3-natives-$openrndrOS:$openrndrVersion")
|
||||
demoImplementation(sourceSets.getByName("main").output)
|
||||
}
|
||||
27
openrndr-demos/src/demo/kotlin/DemoCubemap01.kt
Normal file
27
openrndr-demos/src/demo/kotlin/DemoCubemap01.kt
Normal file
@@ -0,0 +1,27 @@
|
||||
import org.openrndr.application
|
||||
import org.openrndr.draw.Cubemap
|
||||
import org.openrndr.draw.DrawPrimitive
|
||||
import org.openrndr.draw.Session
|
||||
import org.openrndr.draw.shadeStyle
|
||||
import org.openrndr.extras.camera.Orbital
|
||||
import org.openrndr.extras.meshgenerators.boxMesh
|
||||
|
||||
fun main() = application {
|
||||
program {
|
||||
|
||||
val cubemap = Cubemap.fromUrl("file:demo-data/cubemaps/garage_iem.dds", session = Session.active)
|
||||
val cube = boxMesh()
|
||||
extend(Orbital()) {
|
||||
|
||||
}
|
||||
extend {
|
||||
drawer.shadeStyle = shadeStyle {
|
||||
fragmentTransform = """
|
||||
x_fill = texture(p_cubemap, va_position);
|
||||
"""
|
||||
parameter("cubemap", cubemap)
|
||||
}
|
||||
drawer.vertexBuffer(cube, DrawPrimitive.TRIANGLES)
|
||||
}
|
||||
}
|
||||
}
|
||||
27
openrndr-demos/src/demo/kotlin/DemoCubemap02.kt
Normal file
27
openrndr-demos/src/demo/kotlin/DemoCubemap02.kt
Normal file
@@ -0,0 +1,27 @@
|
||||
import org.openrndr.application
|
||||
import org.openrndr.draw.*
|
||||
import org.openrndr.extras.camera.Orbital
|
||||
import org.openrndr.extras.meshgenerators.boxMesh
|
||||
|
||||
fun main() = application {
|
||||
program {
|
||||
val cubemap1 = Cubemap.fromUrl("file:demo-data/cubemaps/garage_iem.dds", session = Session.active)
|
||||
val cube = boxMesh()
|
||||
val cubemap2 = cubemap(cubemap1.width, format = cubemap1.format, type = cubemap1.type, levels = 2, session = Session.active)
|
||||
cubemap1.copyTo(cubemap2, 0, 0)
|
||||
cubemap2.generateMipmaps()
|
||||
|
||||
extend(Orbital()) {
|
||||
|
||||
}
|
||||
extend {
|
||||
drawer.shadeStyle = shadeStyle {
|
||||
fragmentTransform = """
|
||||
x_fill = texture(p_cubemap, va_position);
|
||||
"""
|
||||
parameter("cubemap", cubemap2)
|
||||
}
|
||||
drawer.vertexBuffer(cube, DrawPrimitive.TRIANGLES)
|
||||
}
|
||||
}
|
||||
}
|
||||
29
openrndr-demos/src/demo/kotlin/DemoCubemap03.kt
Normal file
29
openrndr-demos/src/demo/kotlin/DemoCubemap03.kt
Normal file
@@ -0,0 +1,29 @@
|
||||
import org.openrndr.application
|
||||
import org.openrndr.draw.*
|
||||
import org.openrndr.extras.camera.Orbital
|
||||
import org.openrndr.extras.meshgenerators.boxMesh
|
||||
|
||||
fun main() = application {
|
||||
program {
|
||||
val cubemap1 = Cubemap.fromUrl("file:demo-data/cubemaps/garage_iem.dds", session = Session.active)
|
||||
val cube = boxMesh()
|
||||
val cubemap2 = cubemap(cubemap1.width, format = cubemap1.format, type = cubemap1.type, levels = 2, session = Session.active)
|
||||
cubemap1.copyTo(cubemap2, 0, 0)
|
||||
cubemap2.generateMipmaps()
|
||||
|
||||
val cma = arrayCubemap(256, 10)
|
||||
extend(Orbital()) {
|
||||
|
||||
}
|
||||
extend {
|
||||
drawer.shadeStyle = shadeStyle {
|
||||
fragmentTransform = """
|
||||
x_fill = texture(p_cma, vec4(va_position,0.0));
|
||||
"""
|
||||
parameter("cubemap", cubemap2)
|
||||
parameter("cma", cma)
|
||||
}
|
||||
drawer.vertexBuffer(cube, DrawPrimitive.TRIANGLES)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user