Upgrade to JDK 17. Add @JvmRecord annotations

This commit is contained in:
Edwin Jakobs
2024-06-01 07:31:44 +02:00
parent 06f593053b
commit 78fbff54c5
38 changed files with 94 additions and 33 deletions

View File

@@ -8,6 +8,7 @@ import org.openrndr.math.Vector3
import org.openrndr.math.transforms.ortho
import org.openrndr.math.transforms.perspective
@JvmRecord
data class LightContext(val lights: List<NodeContent<Light>>,
val shadowMaps: Map<ShadowLight, RenderTarget>)

View File

@@ -52,8 +52,8 @@ data class MaterialContext(val pass: RenderPass,
@JvmRecord
data class PrimitiveContext(val hasNormalAttribute: Boolean, val hasSkinning: Boolean)
@JvmRecord
data class ContextKey(val materialContext: MaterialContext, val primitiveContext: PrimitiveContext)

View File

@@ -3,6 +3,7 @@ package org.openrndr.extra.dnk3
import org.openrndr.draw.*
import org.openrndr.math.Matrix44
@JvmRecord
data class PostContext(val lightContext: LightContext, val inverseViewMatrix: Matrix44)
interface PostStep {

View File

@@ -5,6 +5,7 @@ import org.openrndr.draw.DepthFormat
import org.openrndr.draw.RenderTarget
import org.openrndr.draw.renderTarget
@JvmRecord
data class RenderPass(val combiners: List<FacetCombiner>,
val renderOpaque: Boolean = true,
val renderTransparent: Boolean = false,

View File

@@ -26,8 +26,10 @@ const val GLTF_ELEMENT_ARRAY_BUFFER = 34963
data class GltfAsset(val generator: String?, val version: String?)
@JvmRecord
data class GltfScene(val nodes: IntArray)
@JvmRecord
data class GltfNode(val name: String?,
val children: IntArray?,
val matrix: DoubleArray?,
@@ -39,8 +41,10 @@ data class GltfNode(val name: String?,
val camera: Int?,
val extensions: GltfNodeExtensions?)
@JvmRecord
data class KHRLightsPunctualIndex(val light: Int)
@JvmRecord
data class GltfNodeExtensions(val KHR_lights_punctual: KHRLightsPunctualIndex?) {
}

View File

@@ -7,6 +7,7 @@ import javax.sound.midi.*
private val logger = KotlinLogging.logger { }
@JvmRecord
data class MidiDeviceName(val name: String, val vendor: String)
class MidiDeviceCapabilities {
@@ -18,6 +19,7 @@ class MidiDeviceCapabilities {
}
}
@JvmRecord
data class MidiDeviceDescription(
val name: String,
val vendor: String,

View File

@@ -16,7 +16,7 @@ fun main() {
}
oliveProgram {
extend {
drawer.clear(ColorRGBa.GRAY)
drawer.clear(ColorRGBa.PINK)
drawer.fill = ColorRGBa.WHITE
for (i in 0 until 100) {
drawer.circle(

View File

@@ -33,6 +33,7 @@ enum class OliveScriptHost {
KOTLIN_SCRIPT
}
@JvmRecord
data class ScriptLoadedEvent(val scriptFile: String)
enum class ScriptMode {

View File

@@ -15,6 +15,7 @@ tasks.test {
dependencies {
implementation(project(":orx-expression-evaluator"))
implementation(project(":orx-color"))
implementation(project(":orx-text-writer"))
implementation(libs.openrndr.application)
implementation(libs.openrndr.math)

View File

@@ -14,8 +14,11 @@ import org.openrndr.shape.Rectangle
import java.util.*
@JvmRecord
data class ElementClass(val name: String)
@JvmRecord
data class ElementPseudoClass(val name: String)
@JvmRecord
data class ElementType(val name: String)
val disabled = ElementPseudoClass("disabled")

View File

@@ -21,6 +21,7 @@ import kotlin.reflect.KMutableProperty0
private val logger = KotlinLogging.logger {}
@JvmRecord
data class Range(val min: Double, val max: Double) {
val span: Double get() = max - min
}

View File

@@ -11,6 +11,7 @@ enum class PropertyInheritance {
RESET
}
@JvmRecord
data class Property(val name: String,
val value: Any?)
@@ -41,7 +42,7 @@ sealed class LinearDimension(inherit: Boolean = false) : PropertyValue(inherit)
object Inherit : LinearDimension(inherit = true)
}
@JvmRecord
data class PropertyBehaviour(val inheritance: PropertyInheritance, val intitial: Any)
object PropertyBehaviours {