Skip to main content
Module

x/sdl2/mod.ts>Texture

SDL2 module for Deno
Go to Latest
class Texture
import { Texture } from "https://deno.land/x/sdl2@0.6.0/mod.ts";

A structure that contains an efficient, driver-specific representation of pixel data.

Methods

Query the attributes of a texture.

setAlphaMod(a: number)

Set an additional alpha value multiplied into render copy operations.

setColorMod(
r: number,
g: number,
b: number,
)

Set an additional color value multiplied into render copy operations.

update(
pixels: Uint8Array,
pitch: number,
rect?: Rect,
)

Update the given texture rectangle with new pixel data.