diff --git a/demo-data/images/image-001.dds b/demo-data/images/image-001.dds new file mode 100644 index 00000000..90363b81 Binary files /dev/null and b/demo-data/images/image-001.dds differ diff --git a/openrndr-demos/src/demo/kotlin/DemoAsyncImages01.kt b/openrndr-demos/src/demo/kotlin/DemoAsyncImages01.kt new file mode 100644 index 00000000..74b9e8e6 --- /dev/null +++ b/openrndr-demos/src/demo/kotlin/DemoAsyncImages01.kt @@ -0,0 +1,15 @@ +import org.openrndr.application +import org.openrndr.internal.colorBufferLoader + +fun main() { + application { + program { + extend { + val proxy = colorBufferLoader.loadFromUrl("https://avatars3.githubusercontent.com/u/31103334?s=200&v=4") + proxy.colorBuffer?.let { + drawer.image(it) + } + } + } + } +} \ No newline at end of file diff --git a/openrndr-demos/src/demo/kotlin/DemoDDSImage01.kt b/openrndr-demos/src/demo/kotlin/DemoDDSImage01.kt new file mode 100644 index 00000000..d94608d8 --- /dev/null +++ b/openrndr-demos/src/demo/kotlin/DemoDDSImage01.kt @@ -0,0 +1,15 @@ +import org.openrndr.application +import org.openrndr.draw.loadImage + +fun main() { + application { + program { + val image = loadImage("demo-data/images/image-001.dds") + println(image.format) + println(image.type) + extend { + drawer.image(image) + } + } + } +} \ No newline at end of file