No matching definitions.

raylib/models

src/raylib/models.tur
defn

load-model

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

load a 3D model from a file (OBJ, GLTF, IQM, ...).

pathfilesystem path to the model file

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

(let [m (load-model "robot.obj")] ...)

Since: P3

defn

unload-model

(unload-model [model :int] :void)

free a model from GPU and CPU memory.

modelModel handle from load-model
(unload-model m)

Since: P3

defn

draw-model

(draw-model [model :int px :float py :float pz :float scale :float tint :int] :void)

draw a model at a position with uniform scale and tint.

modelModel handle
px py pz -- world-space position
scaleuniform scale factor
tintColor handle
(draw-model robot 0.0 0.0 0.0 1.0 (white))

Since: P3

defn

draw-model-ex

(draw-model-ex [model :int px :float py :float pz :float ax :float ay :float az :float angle :float sx :float sy :float sz :float tint :int] :void)

draw a model with per-axis rotation and non-uniform scale.

modelModel handle
px py pz -- world-space position
ax ay az -- rotation axis (unit vector)
anglerotation angle in degrees
sx sy sz -- scale per axis
tintColor handle
(draw-model-ex robot 0.0 0.0 0.0  0.0 1.0 0.0  45.0  1.0 1.0 1.0  (white))

Since: P3

defn

load-mesh

(load-mesh [w :float h :float d :float] :int)

generate a box mesh with the given dimensions.

wwidth (X axis)
hheight (Y axis)
ddepth (Z axis)

Opaque :int handle to a heap-allocated Mesh struct. Upload to GPU with UploadMesh before use with draw-mesh.

(let [mesh (load-mesh 1.0 1.0 1.0)] ...)

Since: P3

defn

draw-mesh

(draw-mesh [mesh :int material :int transform :int] :void)

draw a mesh with the given material and transform matrix.

meshMesh handle from load-mesh or model internals
materialMaterial handle (use load-default-material for a plain white material)
transformMatrix handle (use identity-transform for no transformation)
(draw-mesh mesh mat xform)

Since: P3