Skip to content

Commit

Permalink
[openrndr-demos] add DemoDDSImage01.kt
Browse files Browse the repository at this point in the history
  • Loading branch information
edwinRNDR committed Nov 29, 2020
1 parent 3b83cd8 commit d495b5c
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
Binary file added demo-data/images/image-001.dds
Binary file not shown.
15 changes: 15 additions & 0 deletions openrndr-demos/src/demo/kotlin/DemoAsyncImages01.kt
Original file line number Diff line number Diff line change
@@ -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)
}
}
}
}
}
15 changes: 15 additions & 0 deletions openrndr-demos/src/demo/kotlin/DemoDDSImage01.kt
Original file line number Diff line number Diff line change
@@ -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)
}
}
}
}

0 comments on commit d495b5c

Please sign in to comment.