openrndr / org.openrndr.draw

Package org.openrndr.draw

a core component related to Drawing

Types

BlendMode

enum class BlendMode

BufferMultisample

sealed class BufferMultisample

Buffer multisample options

BufferTexture

interface BufferTexture

BufferTextureShadow

interface BufferTextureShadow

BufferWriter

interface BufferWriter

ChannelMask

class ChannelMask

ColorBuffer

interface ColorBuffer

ColorBufferProxy

data class ColorBufferProxy

ColorBufferShadow

interface ColorBufferShadow

ColorFormat

enum class ColorFormat

ColorType

enum class ColorType

Cubemap

interface Cubemap

CubemapSide

enum class CubemapSide

CullTestPass

enum class CullTestPass

DepthBuffer

interface DepthBuffer

DepthFormat

enum class DepthFormat

DepthTestPass

enum class DepthTestPass

DrawContext

data class DrawContext

DrawPrimitive

enum class DrawPrimitive

DrawQuality

enum class DrawQuality

DrawStyle

data class DrawStyle

DrawThread

interface DrawThread

Drawer

class Drawer

FileFormat

enum class FileFormat

File format used while saving to file

Filter

open class Filter

FontImageMap

class FontImageMap : FontMap

FontImageMapDescriptor

data class FontImageMapDescriptor

FontMap

abstract class FontMap

FontVectorMap

abstract class FontVectorMap : FontMap

GlyphMetrics

class GlyphMetrics

IndexBuffer

interface IndexBuffer

IndexType

enum class IndexType

LineCap

enum class LineCap

LineJoin

enum class LineJoin

MagnifyingFilter

enum class MagnifyingFilter

Texture filters for magnification

MinifyingFilter

enum class MinifyingFilter

Texture filters used for minification

ProgramRenderTarget

interface ProgramRenderTarget : RenderTarget

RenderTarget

interface RenderTarget

RenderTargetBuilder

class RenderTargetBuilder

ShadeStructure

data class ShadeStructure

ShadeStyle

class ShadeStyle

ShadeStyleManager

abstract class ShadeStyleManager

Shader

interface Shader

ShaderWatcher

class ShaderWatcher

ShaderWatcherBuilder

class ShaderWatcherBuilder

StencilOperation

enum class StencilOperation

StencilStyle

class StencilStyle

StencilTest

enum class StencilTest

UniformBlock

interface UniformBlock

UniformBlockLayout

data class UniformBlockLayout

UniformDescription

data class UniformDescription

UniformType

enum class UniformType

VertexBuffer

interface VertexBuffer

VertexBufferShadow

interface VertexBufferShadow

VertexElement

data class VertexElement

VertexElementType

enum class VertexElementType

VertexFormat

class VertexFormat

VertexBuffer Layout describes how data is organized in the VertexBuffer

WrapMode

enum class WrapMode

Texture wrapping mode

Properties

invert

val invert: Matrix55

Functions

codeFromStream

fun codeFromStream(stream: InputStream): String

codeFromURL

fun codeFromURL(url: URL): String
fun codeFromURL(url: String): String

colorBuffer

fun colorBuffer(width: Int, height: Int, contentScale: Double = 1.0, format: ColorFormat = ColorFormat.RGBa, type: ColorType = ColorType.UINT8, multisample: BufferMultisample = BufferMultisample.Disabled): ColorBuffer

creates a ColorBuffer

cubemap

fun cubemap(width: Int, format: ColorFormat = ColorFormat.RGBa, type: ColorType = ColorType.UINT8): Cubemap

depthBuffer

fun depthBuffer(width: Int, height: Int, format: DepthFormat = DepthFormat.DEPTH24_STENCIL8, multisample: BufferMultisample): DepthBuffer

drawThread

fun drawThread(): DrawThread

creates and starts a DrawThread

filterShaderFromCode

fun filterShaderFromCode(fragmentShaderCode: String): Shader

filterShaderFromUrl

fun filterShaderFromUrl(url: String): Shader

filterWatcherFromUrl

fun filterWatcherFromUrl(url: String): ShaderWatcher

grayscale

fun grayscale(r: Double = 0.33, g: Double = 0.33, b: Double = 0.33): Matrix55

indexBuffer

fun indexBuffer(elementCount: Int, type: IndexType): IndexBuffer

isolated

fun Drawer.isolated(function: Drawer.() -> Unit): Unit

Pushes style, view- and projection matrix, calls function and pops.

isolatedWithTarget

fun Drawer.isolatedWithTarget(target: RenderTarget, function: Drawer.() -> Unit): Unit

Pushes style, view- and projection matrix, sets render target, calls function and pops,

launch

fun DrawThread.launch(context: CoroutineContext = this.dispatcher, start: CoroutineStart = CoroutineStart.DEFAULT, block: suspend CoroutineScope.() -> Unit): Job

launches a coroutine on the DrawThread

loadImage

fun loadImage(fileOrUrl: String): ColorBuffer

loads an image from a file or url encoded as String

fun loadImage(file: File): ColorBuffer

loads an image from file

fun loadImage(url: URL): ColorBuffer

loads an image from an url

renderTarget

fun renderTarget(width: Int, height: Int, contentScale: Double = 1.0, multisample: BufferMultisample = BufferMultisample.Disabled, builder: RenderTargetBuilder.() -> Unit): RenderTarget

shadeStyle

fun shadeStyle(builder: ShadeStyle.() -> Unit): ShadeStyle

shaderWatcher

fun shaderWatcher(init: ShaderWatcherBuilder.() -> Unit): ShaderWatcher

tint

fun tint(color: ColorRGBa): Matrix55

vertexBuffer

fun vertexBuffer(vertexFormat: VertexFormat, vertexCount: Int): VertexBuffer

vertexFormat

fun vertexFormat(builder: VertexFormat.() -> Unit): VertexFormat