No matching definitions.

raylib/textures

src/raylib/textures.tur
defn

load-texture

(load-texture [path :cstr] :int)

load a texture from an image file into GPU memory.

pathfilesystem path to an image (PNG, JPG, BMP, TGA, ...)

Opaque :int handle to a heap-allocated Texture2D struct.

(let [tex (load-texture "player.png")] ...)

Since: P3

defn

unload-texture

(unload-texture [tex :int] :void)

free a texture from GPU memory.

texTexture2D handle from load-texture
(unload-texture tex)

Since: P3

defn

draw-texture

(draw-texture [tex :int x :int y :int tint :int] :void)

draw a texture at integer pixel coordinates.

texTexture2D handle
xleft edge (pixels)
ytop edge (pixels)
tintColor handle (use white for no tint)
(draw-texture tex 100 200 (white))

Since: P3

defn

draw-texture-v

(draw-texture-v [tex :int pos :int tint :int] :void)

draw a texture at a Vector2 handle position.

texTexture2D handle
posVector2 position handle
tintColor handle
(draw-texture-v tex pos (white))

Since: P3

defn

draw-texture-ex

(draw-texture-ex [tex :int pos :int rotation :float scale :float tint :int] :void)

draw a texture with rotation and scale.

texTexture2D handle
posVector2 position handle (top-left origin before rotation)
rotationrotation in degrees
scaleuniform scale factor (1.0 = original size)
tintColor handle
(draw-texture-ex tex pos 45.0 2.0 (white))

Since: P3