openrndr / org.openrndr.internal / Driver

Driver

interface Driver

Driver interface. This is the internal interface

Properties

activeRenderTarget

abstract val activeRenderTarget: RenderTarget

contextID

abstract val contextID: Long

fontImageMapManager

abstract val fontImageMapManager: FontMapManager

fontVectorMapManager

abstract val fontVectorMapManager: FontMapManager

shaderGenerators

abstract val shaderGenerators: ShaderGenerators

Functions

clear

abstract fun clear(r: Double, g: Double, b: Double, a: Double): Unit
open fun clear(color: ColorRGBa): Unit

createBufferTexture

abstract fun createBufferTexture(elementCount: Int, format: ColorFormat, type: ColorType): BufferTexture

createColorBuffer

abstract fun createColorBuffer(width: Int, height: Int, contentScale: Double, format: ColorFormat, type: ColorType, multisample: BufferMultisample = BufferMultisample.Disabled): ColorBuffer

createColorBufferFromFile

abstract fun createColorBufferFromFile(filename: String): ColorBuffer

createColorBufferFromUrl

abstract fun createColorBufferFromUrl(url: String): ColorBuffer

createCubemap

abstract fun createCubemap(width: Int, format: ColorFormat, type: ColorType): Cubemap

createCubemapFromUrls

abstract fun createCubemapFromUrls(urls: List<String>): Cubemap

createDepthBuffer

abstract fun createDepthBuffer(width: Int, height: Int, format: DepthFormat, multisample: BufferMultisample = BufferMultisample.Disabled): DepthBuffer

createDrawThread

abstract fun createDrawThread(): DrawThread

createDynamicIndexBuffer

abstract fun createDynamicIndexBuffer(elementCount: Int, type: IndexType): IndexBuffer

createDynamicVertexBuffer

abstract fun createDynamicVertexBuffer(format: VertexFormat, vertexCount: Int): VertexBuffer

createRenderTarget

abstract fun createRenderTarget(width: Int, height: Int, contentScale: Double = 1.0, multisample: BufferMultisample = BufferMultisample.Disabled): RenderTarget

createResourceThread

abstract fun createResourceThread(f: () -> Unit): ResourceThread

createShadeStyleManager

abstract fun createShadeStyleManager(vertexShaderGenerator: (ShadeStructure) -> String, fragmentShaderGenerator: (ShadeStructure) -> String): ShadeStyleManager

createShader

abstract fun createShader(vsCode: String, fsCode: String): Shader

createStaticVertexBuffer

abstract fun createStaticVertexBuffer(format: VertexFormat, buffer: Buffer): VertexBuffer

drawIndexedInstances

abstract fun drawIndexedInstances(shader: Shader, indexBuffer: IndexBuffer, vertexBuffers: List<VertexBuffer>, instanceAttributes: List<VertexBuffer>, drawPrimitive: DrawPrimitive, indexOffset: Int, indexCount: Int, instanceCount: Int): Unit

drawIndexedVertexBuffer

abstract fun drawIndexedVertexBuffer(shader: Shader, indexBuffer: IndexBuffer, vertexBuffers: List<VertexBuffer>, drawPrimitive: DrawPrimitive, indexOffset: Int, indexCount: Int): Unit

drawInstances

abstract fun drawInstances(shader: Shader, vertexBuffers: List<VertexBuffer>, instanceAttributes: List<VertexBuffer>, drawPrimitive: DrawPrimitive, vertexOffset: Int, vertexCount: Int, instanceCount: Int): Unit

drawVertexBuffer

abstract fun drawVertexBuffer(shader: Shader, vertexBuffers: List<VertexBuffer>, drawPrimitive: DrawPrimitive, vertexOffset: Int, vertexCount: Int): Unit

finish

abstract fun finish(): Unit

waits for all drawing to complete

internalShaderResource

abstract fun internalShaderResource(resourceId: String): String

setState

abstract fun setState(drawStyle: DrawStyle): Unit

Companion Object Properties

driver

lateinit var driver: Driver

instance

val instance: Driver

Inheritors

DriverGL3

class DriverGL3 : Driver