D3D11TextureImporter

Imports Direct3D 11 textures of one ID3D11Device as color buffers that share the memory of the texture, without copying it.

Importers are created by drivers that implement D3D11TextureImporterFactory. All functions must be called on the thread that draws.

Since

openrndr 0.5.1

Functions

Link copied to clipboard
abstract override fun close()

Releases all imported color buffers, the device can be destroyed afterwards

Link copied to clipboard
abstract fun import(texture: Long, width: Int, height: Int, format: ColorFormat, type: ColorType): ColorBuffer?

Returns a color buffer that shares texture, an ID3D11Texture2D of width x height pixels that was created on the device of the importer with D3D11_BIND_RENDER_TARGET and D3D11_BIND_SHADER_RESOURCE.

Link copied to clipboard
abstract fun lock(colorBuffer: ColorBuffer): Boolean

Makes colorBuffer available to draw with, waiting for the Direct3D commands that write it

Link copied to clipboard
abstract fun release(colorBuffer: ColorBuffer)

Stops sharing the texture of colorBuffer and destroys colorBuffer

Link copied to clipboard
abstract fun unlock(colorBuffer: ColorBuffer)

Returns colorBuffer to Direct3D