[openrndr-demos] add DemoDDSImage01.kt

This commit is contained in:
Edwin Jakobs
2020-11-29 21:27:51 +01:00
parent 3b83cd8e12
commit d495b5cfee
3 changed files with 30 additions and 0 deletions

View File

@@ -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)
}
}
}
}
}

View File

@@ -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)
}
}
}
}