Rayex.Core (Rayex v0.0.2) View Source
Main functions
Link to this section Summary
Functions
Setup canvas (framebuffer) to start drawing
Begin 2D mode with custom camera (2D)
Begin 3D mode with custom camera (3D)
Set background color (framebuffer clear color)
Clear window configuration state flags
Close window and unload OpenGL context
End canvas drawing and swap buffers (double buffering)
Ends 2D mode with custom camera
Ends 3D mode and returns to default 2D orthographic mode
Get current FPS
Get time in seconds for last frame drawn (delta time)
Get mouse position XY
Get a ray trace from mouse position
Get elapsed time in seconds since init_window/0
Initialize window and OpenGL context
Check if a mouse button is being pressed
Check if a mouse button has been pressed once
Check if a mouse button has been released once
Check if a mouse button is NOT being pressed
Set camera alt key to combine with mouse movement (free camera)
Set camera mode (multiple camera modes available)
Set camera move controls (1st person and 3rd person cameras)
Set camera pan key to combine with mouse movement (free camera)
Set camera smooth zoom key to combine with mouse (free camera)
Set target FPS (maximum)
Set window configuration state using flags
Toggle window state: fullscreen/windowed (only PLATFORM_DESKTOP)
Update camera position for selected mode
Check if window is currently focused (only PLATFORM_DESKTOP)
Check if window is currently fullscreen
Check if window is currently hidden (only PLATFORM_DESKTOP)
Check if window is currently maximized (only PLATFORM_DESKTOP)
Check if window is currently minimized (only PLATFORM_DESKTOP)
Check if window has been initialized successfully
Check if window has been resized last frame
Check if KEY_ESCAPE pressed or Close icon pressed
Check if one specific window flag is enabled
Link to this section Functions
Specs
begin_drawing() :: :ok
Setup canvas (framebuffer) to start drawing
Specs
begin_mode_2d(Rayex.Structs.Camera2D.t()) :: :ok
Begin 2D mode with custom camera (2D)
Specs
begin_mode_3d(Rayex.Structs.Camera3D.t()) :: :ok
Begin 3D mode with custom camera (3D)
Specs
clear_background(Rayex.Structs.Color.t()) :: :ok
Set background color (framebuffer clear color)
Specs
clear_window_state(non_neg_integer()) :: :ok
Clear window configuration state flags
Specs
close_window() :: :ok
Close window and unload OpenGL context
Specs
end_drawing() :: :ok
End canvas drawing and swap buffers (double buffering)
Specs
end_mode_2d() :: :ok
Ends 2D mode with custom camera
Specs
end_mode_3d() :: :ok
Ends 3D mode and returns to default 2D orthographic mode
Specs
get_fps() :: non_neg_integer()
Get current FPS
Specs
get_frame_time() :: float()
Get time in seconds for last frame drawn (delta time)
Specs
get_mouse_position() :: Rayex.Structs.Vector2.t()
Get mouse position XY
Specs
get_mouse_ray(Rayex.Structs.Vector2.t(), Rayex.Structs.Camera3D.t()) :: Rayex.Structs.Ray.t()
Get a ray trace from mouse position
Specs
get_time() :: float()
Get elapsed time in seconds since init_window/0
Specs
Initialize window and OpenGL context
Specs
Check if a mouse button is being pressed
Specs
Check if a mouse button has been pressed once
Specs
Check if a mouse button has been released once
Specs
Check if a mouse button is NOT being pressed
Specs
set_camera_alt_control(integer()) :: :ok
Set camera alt key to combine with mouse movement (free camera)
Specs
set_camera_mode(Rayex.Structs.Camera3D.t(), integer()) :: integer()
Set camera mode (multiple camera modes available)
set_camera_move_controls(key_front, key_back, key_right, key_left, key_up, key_down)
View SourceSpecs
Set camera move controls (1st person and 3rd person cameras)
Specs
set_camera_pan_control(integer()) :: :ok
Set camera pan key to combine with mouse movement (free camera)
Specs
set_camera_smooth_zoom_control(integer()) :: :ok
Set camera smooth zoom key to combine with mouse (free camera)
Specs
set_target_fps(non_neg_integer()) :: :ok
Set target FPS (maximum)
Specs
set_window_state(non_neg_integer()) :: :ok
Set window configuration state using flags
Specs
toggle_fullscreen() :: :ok
Toggle window state: fullscreen/windowed (only PLATFORM_DESKTOP)
Specs
update_camera(Rayex.Structs.Camera3D.t()) :: Rayex.Structs.Camera3D.t()
Update camera position for selected mode
Specs
window_focused?() :: boolean()
Check if window is currently focused (only PLATFORM_DESKTOP)
Specs
window_fullscreen?() :: boolean()
Check if window is currently fullscreen
Specs
window_maximized?() :: boolean()
Check if window is currently maximized (only PLATFORM_DESKTOP)
Specs
window_minimized?() :: boolean()
Check if window is currently minimized (only PLATFORM_DESKTOP)
Specs
window_ready?() :: boolean()
Check if window has been initialized successfully
Specs
window_resized?() :: boolean()
Check if window has been resized last frame
Specs
window_should_close() :: boolean()
Check if KEY_ESCAPE pressed or Close icon pressed
Specs
window_state?(non_neg_integer()) :: boolean()
Check if one specific window flag is enabled