Improve compatibility with GLES back-end
This commit is contained in:
@@ -29,8 +29,8 @@ fun main() = application {
|
||||
// sets angle and radius based on time and shape ID.
|
||||
drawer.shadeStyle = shadeStyle {
|
||||
vertexTransform = """
|
||||
float a = c_instance + p_time * 0.1;
|
||||
float r = 200 + 100 * sin(a * 0.998);
|
||||
float a = float(c_instance) + p_time * 0.1;
|
||||
float r = 200.0 + 100.0 * sin(a * 0.998);
|
||||
x_position.x += r * sin(a);
|
||||
x_position.y += r * cos(a);
|
||||
""".trimIndent()
|
||||
|
||||
@@ -1,15 +1,12 @@
|
||||
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.draw.*
|
||||
import org.openrndr.extra.camera.Orbital
|
||||
import org.openrndr.extra.meshgenerators.boxMesh
|
||||
|
||||
fun main() = application {
|
||||
program {
|
||||
|
||||
val cubemap = Cubemap.fromUrl("file:demo-data/cubemaps/garage_iem.dds", null, session = Session.active)
|
||||
val cubemap = loadCubemap("demo-data/cubemaps/garage_iem.dds", null, session = Session.active)
|
||||
val cube = boxMesh()
|
||||
extend(Orbital()) {
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import org.openrndr.extra.meshgenerators.boxMesh
|
||||
|
||||
fun main() = application {
|
||||
program {
|
||||
val cubemap1 = Cubemap.fromUrl("file:demo-data/cubemaps/garage_iem.dds", null, session = Session.active)
|
||||
val cubemap1 = loadCubemap("demo-data/cubemaps/garage_iem.dds", null, 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)
|
||||
|
||||
@@ -5,7 +5,7 @@ import org.openrndr.extra.meshgenerators.boxMesh
|
||||
|
||||
fun main() = application {
|
||||
program {
|
||||
val cubemap1 = Cubemap.fromUrl("file:demo-data/cubemaps/garage_iem.dds", null, session = Session.active)
|
||||
val cubemap1 = loadCubemap("demo-data/cubemaps/garage_iem.dds", null, 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)
|
||||
|
||||
Reference in New Issue
Block a user