All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.dsl.functions.IntRImage2DFunctions.kt Maven / Gradle / Ivy

package org.openrndr.orsl.shadergenerator.dsl.functions

import org.openrndr.orsl.shadergenerator.dsl.*
import org.openrndr.math.IntVector2
import kotlin.jvm.JvmName

@Suppress("INAPPLICABLE_JVM_NAME")
interface IntRImage2DFunctions : Generator{
    @JvmName("loadSiri2Siv2")
    fun Symbol.load(uv: Symbol): Symbol =
        functionSymbol(this, uv, "imageLoad($0, $1)")

    @JvmName("storeSiri2Siv2Sv4")
    fun Symbol.store(uv: Symbol, data: Symbol) =
        functionCall(this, uv,  data,"imageStore($0, $1, ivec4($2))")

    @JvmName("sizeSiri2")
    fun Symbol.size(): Symbol =
        functionSymbol(this, "imageSize($0)")

    @JvmName("atomicExchangeSiri2Siv2Sv4")
    fun Symbol.atomicExchange(uv: Symbol, data: Symbol): Symbol =
        functionSymbol(this, uv,  data,"atomicExchange($0, $1, $2)")

    @JvmName("atomicCompSwapSiri2Siv2Sv4")
    fun Symbol.atomicCompSwap(uv: Symbol, compare: Symbol, data: Symbol): Symbol =
        functionSymbol(this, uv, compare,  data,"atomicExchange($0, $1, $2, $3)")

    @JvmName("atomicAddSiri2Siv2Si")
    fun Symbol.atomicAdd(uv: Symbol, data: Symbol): Symbol =
        functionSymbol(this, uv,  data,"atomicAdd($0, $1, $2)")

    @JvmName("atomicAddSiri2Siv2Vi")
    fun Symbol.atomicAdd(uv: Symbol, data: Int): Symbol =
        functionSymbolSSV(this, uv,  data, "imageAtomicAdd($0, $1, $2)")


    @JvmName("atomicSubSiri2Siv2Si")
    fun Symbol.atomicSub(uv: Symbol, data: Symbol): Symbol =
        functionSymbol(this, uv,  data,"atomicAdd($0, $1, -($2))")

    @JvmName("atomicAndSiri2Siv2Si")
    fun Symbol.atomicAnd(uv: Symbol, data: Symbol): Symbol =
        functionSymbol(this, uv,  data,"atomicAnd($0, $1, $2)")

    @JvmName("atomicOrSiri2Siv2Si")
    fun Symbol.atomicOr(uv: Symbol, data: Symbol): Symbol =
        functionSymbol(this, uv,  data,"atomicOr($0, $1, $2)")

    @JvmName("atomicXorSiri2Siv2Si")
    fun Symbol.atomicXor(uv: Symbol, data: Symbol): Symbol =
        functionSymbol(this, uv,  data,"atomicXor($0, $1, $2)")

    @JvmName("atomicMinSiri2Siv2Si")
    fun Symbol.atomicMin(uv: Symbol, data: Symbol): Symbol =
        functionSymbol(this, uv,  data,"atomicMin($0, $1, $2)")

    @JvmName("atomicMaxSiri2Siv2Si")
    fun Symbol.atomicMax(uv: Symbol, data: Symbol): Symbol =
        functionSymbol(this, uv,  data,"atomicMax($0, $1, $2)")
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy