Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/sdl2/mod.ts>Texture

SDL2 module for Deno
Latest
class Texture
import { Texture } from "https://deno.land/x/sdl2@0.9.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.