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

commonMain.org.openrndr.draw.IndexBuffer.kt Maven / Gradle / Ivy

There is a newer version: 0.4.5-alpha6
Show newest version
package org.openrndr.draw


enum class IndexType(val sizeInBytes:Int) {
    INT16(2),
    INT32(4)
}

expect interface IndexBuffer {
    companion object {
        fun createDynamic(elementCount: Int, type: IndexType): IndexBuffer
    }

    val indexCount: Int
    val type: IndexType
    fun destroy()
}


fun indexBuffer(elementCount: Int, type: IndexType): IndexBuffer {
    return IndexBuffer.createDynamic(elementCount, type)
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy