View Source Rayex.Core (Rayex v0.0.3)
Main functions
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
Disables cursor (lock cursor)
Enables cursor (unlock cursor)
End canvas drawing and swap buffers (double buffering)
Ends 2D mode with custom camera
Ends 3D mode and returns to default 2D orthographic mode
See Rayex.Unifex.Raylib.get_char_pressed/0
.
Get current FPS
Get time in seconds for last frame drawn (delta time)
See Rayex.Unifex.Raylib.get_key_pressed/0
.
Get mouse position XY
Get a ray trace from mouse position
Get elapsed time in seconds since init_window/0
Hides cursor
Initialize window and OpenGL context
Check if cursor is not visible
Check if cursor is on the screen
Check if a key is being pressed
Check if a key has been pressed once
Check if a key is being pressed
Check if a key has been released
Check is a key is not being pressed
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 the key that will close the program
Set target FPS (maximum)
Set window configuration state using flags
Shows cursor
Toggle window state: fullscreen/windowed (only PLATFORM_DESKTOP)
Update camera position for selected mode
Update camera movement/rotation
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
Functions
@spec begin_drawing() :: :ok
Setup canvas (framebuffer) to start drawing
@spec begin_mode_2d(Rayex.Structs.Camera2D.t()) :: :ok
Begin 2D mode with custom camera (2D)
@spec begin_mode_3d(Rayex.Structs.Camera3D.t()) :: :ok
Begin 3D mode with custom camera (3D)
@spec clear_background(Rayex.Structs.Color.t()) :: :ok
Set background color (framebuffer clear color)
@spec clear_window_state(non_neg_integer()) :: :ok
Clear window configuration state flags
@spec close_window() :: :ok
Close window and unload OpenGL context
@spec disable_cursor() :: :ok
Disables cursor (lock cursor)
@spec enable_cursor() :: :ok
Enables cursor (unlock cursor)
@spec end_drawing() :: :ok
End canvas drawing and swap buffers (double buffering)
@spec end_mode_2d() :: :ok
Ends 2D mode with custom camera
@spec end_mode_3d() :: :ok
Ends 3D mode and returns to default 2D orthographic mode
@spec get_char_pressed() :: integer()
See Rayex.Unifex.Raylib.get_char_pressed/0
.
@spec get_fps() :: non_neg_integer()
Get current FPS
@spec get_frame_time() :: float()
Get time in seconds for last frame drawn (delta time)
@spec get_key_pressed() :: integer()
See Rayex.Unifex.Raylib.get_key_pressed/0
.
@spec get_mouse_position() :: Rayex.Structs.Vector2.t()
Get mouse position XY
@spec get_mouse_ray(Rayex.Structs.Vector2.t(), Rayex.Structs.Camera3D.t()) :: Rayex.Structs.Ray.t()
Get a ray trace from mouse position
@spec get_time() :: float()
Get elapsed time in seconds since init_window/0
@spec hide_cursor() :: :ok
Hides cursor
Initialize window and OpenGL context
@spec is_cursor_on_screen?() :: boolean()
Check if cursor is on the screen
Check if a key is being pressed
Check if a key has been pressed once
Check if a key is being pressed
Check if a key has been released
Check is a key is not being pressed
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
@spec set_exit_key(integer()) :: :ok
Set the key that will close the program
@spec set_target_fps(non_neg_integer()) :: :ok
Set target FPS (maximum)
@spec set_window_state(non_neg_integer()) :: :ok
Set window configuration state using flags
@spec show_cursor() :: :ok
Shows cursor
@spec toggle_fullscreen() :: :ok
Toggle window state: fullscreen/windowed (only PLATFORM_DESKTOP)
@spec update_camera(Rayex.Structs.Camera3D.t(), pos_integer()) :: Rayex.Structs.Camera3D.t()
Update camera position for selected mode
@spec update_camera_pro( Rayex.Structs.Camera3D.t(), Rayex.Structs.Vector3.t(), Rayex.Structs.Vector3.t(), float() ) :: Rayex.Structs.Camera3D.t()
Update camera movement/rotation
@spec window_focused?() :: boolean()
Check if window is currently focused (only PLATFORM_DESKTOP)
@spec window_fullscreen?() :: boolean()
Check if window is currently fullscreen
@spec window_maximized?() :: boolean()
Check if window is currently maximized (only PLATFORM_DESKTOP)
@spec window_minimized?() :: boolean()
Check if window is currently minimized (only PLATFORM_DESKTOP)
@spec window_ready?() :: boolean()
Check if window has been initialized successfully
@spec window_resized?() :: boolean()
Check if window has been resized last frame
@spec window_should_close() :: boolean()
Check if KEY_ESCAPE pressed or Close icon pressed
@spec window_state?(non_neg_integer()) :: boolean()
Check if one specific window flag is enabled