No matching definitions.

raylib/core

src/raylib/core.tur
defn

init-window

(init-window [width :int height :int title :cstr] :void)

create the window and initialize the OpenGL context.

widthwindow width in pixels
heightwindow height in pixels
titlewindow title string
(init-window 800 600 "My Game")

Since: P3

defn

close-window

(close-window :void)

close the window and free the OpenGL context.

(close-window)

Since: P3

defn

window-should-close

(window-should-close :bool)

return true if the user requested window close.

true if ESC was pressed or the close button was clicked.

(while (not (window-should-close)) ...)

Since: P3

defn

begin-drawing

(begin-drawing :void)

start a new frame; must be paired with end-drawing.

(begin-drawing)

Since: P3

defn

end-drawing

(end-drawing :void)

end the frame and present the backbuffer.

(end-drawing)

Since: P3

defn

begin-mode-3d

(begin-mode-3d [camera :int] :void)

enter 3D drawing mode using a Camera3D handle.

cameraCamera3D handle from raylib/camera camera-3d
(begin-mode-3d cam)

Since: P3

defn

end-mode-3d

(end-mode-3d :void)

exit 3D drawing mode.

(end-mode-3d)

Since: P3

defn

clear-background

(clear-background [col :int] :void)

fill the backbuffer with a solid color.

colColor handle from raylib/color
(clear-background (raywhite))

Since: P3

defn

set-target-fps

(set-target-fps [fps :int] :void)

cap the frame rate.

fpstarget frames per second (0 = uncapped)
(set-target-fps 60)

Since: P3

defn

get-frame-time

(get-frame-time :float)

return the duration of the last frame in seconds.

Frame time as :float (delta time for physics / animation).

(let [dt (get-frame-time)] ...)

Since: P3