Upgrade to Gradle 8.10, Kotlin 2.0.20, reduce warnings

This commit is contained in:
Edwin Jakobs
2024-08-25 09:39:18 +02:00
parent 5b6f2ec1ff
commit 8a4a85d333
37 changed files with 133 additions and 81 deletions

View File

@@ -10,8 +10,7 @@ fun main() = application {
program {
val shader = Shader.createFromCode(vsCode =
"""
#version 430
"""${Driver.instance.shaderConfiguration()}
in vec3 a_position;
in vec2 a_texCoord0;
in vec3 a_normal;
@@ -22,16 +21,15 @@ void main() {
gl_Position = projMatrix * vec4(a_position, 1.0);
}
""",
fsCode = """
#version 430
fsCode = """${Driver.instance.shaderConfiguration()}
out vec4 o_color;
layout(rgba8) uniform image2D bla;
layout(rgba8) uniform writeonly image2D bla;
void main() {
imageStore(bla, ivec2(30,30), vec4(1.0, 0.0, 0.0, 1.0));
o_color = vec4(1.0);
}
""", name = "ils")
val cb = colorBuffer(128, 128)
val cb = colorBuffer(128, 128, type = ColorType.UINT8)
val mesh = planeMesh(Vector3.ZERO, Vector3.UNIT_X, Vector3.UNIT_Y, -Vector3.UNIT_Z, 100.0, 100.0)
extend {

View File

@@ -1,25 +1,25 @@
import org.openrndr.application
import org.openrndr.color.ColorRGBa
import org.openrndr.draw.ImageAccess
import org.openrndr.draw.colorBuffer
import org.openrndr.draw.imageBinding
import org.openrndr.draw.shadeStyle
import org.openrndr.draw.*
fun main() = application {
program {
val cb = colorBuffer(128, 128)
extend {
val ss = shadeStyle {
fragmentTransform = """
imageStore(p_image, ivec2(30.0, 30.0), vec4(1.0, 0.0, 0.0, 1.0));
val cb = colorBuffer(128, 128, type = ColorType.UINT8)
cb.fill(ColorRGBa.BLACK)
val ss = shadeStyle {
fragmentTransform = """
imageStore(p_image, ivec2(30, 30), vec4(1.0, 0.0, 0.0, 1.0));
""".trimIndent()
parameter("image", cb.imageBinding(0, ImageAccess.READ_WRITE))
}
image("image", cb.imageBinding(0, ImageAccess.WRITE))
}
extend {
drawer.shadeStyle = ss
drawer.clear(ColorRGBa.PINK)
drawer.rectangle(0.0, 0.0, 100.0, 100.0)
drawer.shadeStyle = null
drawer.image(cb, 0.0, 200.0)
}
}

View File

@@ -1,13 +1,10 @@
import org.openrndr.application
import org.openrndr.color.ColorRGBa
import org.openrndr.draw.VolumeTexture
import org.openrndr.draw.colorBuffer
import org.openrndr.draw.isolatedWithTarget
import org.openrndr.draw.renderTarget
import org.openrndr.draw.*
fun main() = application {
program {
val volumeTexture = VolumeTexture.create(128,128,32)
val volumeTexture = VolumeTexture.create(128,128,32, type = ColorType.UINT8)
val rt = renderTarget(128, 128) {
volumeTexture(volumeTexture, 0)
}