R-Type
Distributed multiplayer game engine in C++
Loading...
Searching...
No Matches
Graphics::IGraphics Class Referenceabstract

Abstract interface for graphics rendering operations. More...

#include <IGraphics.hpp>

Inheritance diagram for Graphics::IGraphics:
Inheritance graph
Collaboration diagram for Graphics::IGraphics:
Collaboration graph

Public Member Functions

virtual ~IGraphics ()=default
 Virtual destructor.
 
virtual void InitWindow (int width, int height, const char *title)=0
 Initialize the graphics window.
 
virtual void ClearWindow ()=0
 Clear the window with the current clear color.
 
virtual void StartDrawing ()=0
 Begin drawing frame (setup canvas for drawing operations)
 
virtual void DisplayWindow ()=0
 Display the current frame to the window (end drawing and swap buffers)
 
virtual bool IsWindowOpen () const =0
 Check if the window is still open.
 
virtual void CloseWindow ()=0
 Close the graphics window and cleanup resources.
 
virtual int GetWindowWidth () const =0
 Get current window width in pixels.
 
virtual int GetWindowHeight () const =0
 Get current window height in pixels.
 
virtual void SetWindowTitle (const char *title)=0
 Change the window title.
 
virtual void SetWindowSize (int width, int height)=0
 Resize the window.
 
virtual void ToggleFullScreen ()=0
 Toggle between fullscreen and windowed mode.
 
virtual void SetTargetFPS (int fps)=0
 Set the target frames per second for rendering.
 
virtual void SetClearColor (unsigned int color)=0
 Set the background clear color.
 
virtual void TakeScreenshot (const char *filepath)=0
 Capture the current screen and save it to a file.
 
virtual float GetTime () const =0
 Get elapsed time since initialization.
 
virtual float GetDeltaTime () const =0
 Get the time elapsed for the last frame.
 
virtual void DrawRect (int x, int y, int width, int height, unsigned int color)=0
 Draw a rectangle outline.
 
virtual void DrawRectFilled (int x, int y, int width, int height, unsigned int color)=0
 Draw a filled rectangle.
 
virtual void DrawCircle (int x, int y, int radius, unsigned int color)=0
 Draw a circle outline.
 
virtual void DrawCircleFilled (int x, int y, int radius, unsigned int color)=0
 Draw a filled circle.
 
virtual int LoadFont (const char *filepath, int size)=0
 Load a font from file.
 
virtual void UnloadFont (int fontHandle)=0
 Unload a previously loaded font.
 
virtual void DrawText (int fontHandle, const char *text, int x, int y, int fontSize, unsigned int color)=0
 Draw text using a loaded font.
 
virtual int GetFontHeight (int fontHandle, int fontSize)=0
 Get the height of a font at a given size.
 
virtual int LoadTexture (const char *textureName, const char *filepath)=0
 Load a texture from an image file.
 
virtual int CreateTextureFromMemory (const char *textureName, const void *pixels, int width, int height, int format)=0
 Create a texture from raw pixel data in memory.
 
virtual void UpdateTexture (const char *textureName, const void *pixels)=0
 Update an existing texture with new pixel data.
 
virtual void UnloadTexture (const char *textureName)=0
 Unload a previously loaded texture.
 
virtual void DrawTexture (const char *textureName, int x, int y, unsigned int tint)=0
 Draw a texture at the specified position.
 
virtual void DrawTextureEx (const char *textureName, int srcX, int srcY, int srcW, int srcH, float destX, float destY, float rotation, float scale, unsigned int tint)=0
 Draw a texture with advanced parameters (rotation, scale, source rectangle)
 
virtual bool GetTextureSize (const char *textureName, int &width, int &height) const =0
 Get the dimensions of a loaded texture.
 
virtual void DrawTexturePro (const char *textureName, int srcX, int srcY, int srcW, int srcH, float destX, float destY, float destW, float destH, unsigned int tint)=0
 Draw a texture with separate width/height scaling (for non-uniform scaling)
 
virtual bool IsKeyPressed (int key) const =0
 Check if a key was pressed (triggered once when key goes down)
 
virtual bool IsKeyDown (int key) const =0
 Check if a key is currently being held down.
 
virtual bool IsKeyReleased (int key) const =0
 Check if a key was released (triggered once when key goes up)
 
virtual bool IsGamepadAvailable (int gamepad) const =0
 Check if a gamepad is available/connected.
 
virtual bool IsGamepadButtonPressed (int gamepad, int button) const =0
 Check if a gamepad button was pressed this frame.
 
virtual bool IsGamepadButtonDown (int gamepad, int button) const =0
 Check if a gamepad button is currently held down.
 
virtual float GetGamepadAxisMovement (int gamepad, int axis) const =0
 Get gamepad axis value (for analog sticks and triggers)
 
virtual bool IsMouseButtonPressed (int button) const =0
 Check if a mouse button was pressed (triggered once when button goes down)
 
virtual bool IsMouseButtonDown (int button) const =0
 Check if a mouse button is currently being held down.
 
virtual void GetMousePosition (float &x, float &y) const =0
 Get the current mouse cursor position.
 
virtual bool WindowShouldClose () const =0
 Check if the window should close.
 
virtual int GetMouseX () const =0
 Get the current X position of the mouse cursor.
 
virtual int GetMouseY () const =0
 Get the current Y position of the mouse cursor.
 
virtual int GetCharPressed () const =0
 Get the next character from the keyboard input queue.
 
virtual int GetScreenWidth () const =0
 Get the screen width (same as window width)
 
virtual int GetScreenHeight () const =0
 Get the screen height (same as window height)
 
virtual void DrawRectangle (int x, int y, int width, int height, unsigned int color)=0
 Draw a filled rectangle (alias for DrawRectFilled)
 
virtual void DrawRectangleLines (int x, int y, int width, int height, unsigned int color)=0
 Draw a rectangle outline (alias for DrawRect)
 
virtual void DrawText (const char *text, int x, int y, int fontSize, unsigned int color)=0
 Draw text using default font (simplified version)
 
virtual void SetColorblindFilter (ColorblindFilterType filter)=0
 Set the colorblind filter type.
 
virtual ColorblindFilterType GetColorblindFilter () const =0
 Get the current colorblind filter type.
 
virtual void BeginColorblindCapture ()=0
 Begin capturing frame for colorblind filter processing.
 
virtual void EndColorblindCapture ()=0
 End capturing and apply the colorblind filter.
 
virtual void InitAudioDevice ()=0
 Initialize the audio device.
 
virtual void CloseAudioDevice ()=0
 Close the audio device and cleanup audio resources.
 
virtual bool IsAudioDeviceReady () const =0
 Check if audio device is ready.
 
virtual bool LoadSound (const char *soundName, const char *filepath)=0
 Load a sound from file.
 
virtual void UnloadSound (const char *soundName)=0
 Unload a previously loaded sound.
 
virtual void PlaySound (const char *soundName)=0
 Play a loaded sound.
 
virtual void SetSoundVolume (const char *soundName, float volume)=0
 Set volume for a specific sound.
 
virtual bool IsSoundPlaying (const char *soundName) const =0
 Check if a sound is currently playing.
 

Detailed Description

Abstract interface for graphics rendering operations.

This interface provides a platform-agnostic API for window management, rendering primitives, texture handling, font rendering, and input processing. Implementations should provide concrete backends (e.g., Raylib, SDL, SFML).

Note
All color values follow the format 0xAARRGGBB (Alpha, Red, Green, Blue)

Definition at line 32 of file IGraphics.hpp.

Constructor & Destructor Documentation

◆ ~IGraphics()

virtual Graphics::IGraphics::~IGraphics ( )
virtualdefault

Virtual destructor.

Member Function Documentation

◆ BeginColorblindCapture()

virtual void Graphics::IGraphics::BeginColorblindCapture ( )
pure virtual

Begin capturing frame for colorblind filter processing.

Note
Must be called after StartDrawing() and before any draw calls

Implemented in Graphics::RaylibGraphics.

◆ ClearWindow()

virtual void Graphics::IGraphics::ClearWindow ( )
pure virtual

Clear the window with the current clear color.

Implemented in Graphics::RaylibGraphics.

Referenced by Game::LoginMenu::Render().

◆ CloseAudioDevice()

virtual void Graphics::IGraphics::CloseAudioDevice ( )
pure virtual

Close the audio device and cleanup audio resources.

Implemented in Graphics::RaylibGraphics.

◆ CloseWindow()

virtual void Graphics::IGraphics::CloseWindow ( )
pure virtual

Close the graphics window and cleanup resources.

Implemented in Graphics::RaylibGraphics.

◆ CreateTextureFromMemory()

virtual int Graphics::IGraphics::CreateTextureFromMemory ( const char *  textureName,
const void *  pixels,
int  width,
int  height,
int  format 
)
pure virtual

Create a texture from raw pixel data in memory.

Parameters
pixelsPointer to raw pixel data
widthWidth of the texture in pixels
heightHeight of the texture in pixels
formatPixel format (implementation-specific)
Returns
Texture handle (integer ID) for use in drawing operations

Implemented in Graphics::RaylibGraphics.

◆ DisplayWindow()

virtual void Graphics::IGraphics::DisplayWindow ( )
pure virtual

Display the current frame to the window (end drawing and swap buffers)

Implemented in Graphics::RaylibGraphics.

◆ DrawCircle()

virtual void Graphics::IGraphics::DrawCircle ( int  x,
int  y,
int  radius,
unsigned int  color 
)
pure virtual

Draw a circle outline.

Parameters
xX coordinate of the circle center
yY coordinate of the circle center
radiusRadius of the circle in pixels
colorColor in 0xAARRGGBB format

Implemented in Graphics::RaylibGraphics.

Referenced by UI::RaylibSlider::Render().

◆ DrawCircleFilled()

virtual void Graphics::IGraphics::DrawCircleFilled ( int  x,
int  y,
int  radius,
unsigned int  color 
)
pure virtual

Draw a filled circle.

Parameters
xX coordinate of the circle center
yY coordinate of the circle center
radiusRadius of the circle in pixels
colorColor in 0xAARRGGBB format

Implemented in Graphics::RaylibGraphics.

Referenced by UI::RaylibSlider::Render().

◆ DrawRect()

virtual void Graphics::IGraphics::DrawRect ( int  x,
int  y,
int  width,
int  height,
unsigned int  color 
)
pure virtual

Draw a rectangle outline.

Parameters
xX coordinate of the top-left corner
yY coordinate of the top-left corner
widthWidth of the rectangle
heightHeight of the rectangle
colorColor in 0xAARRGGBB format

Implemented in Graphics::RaylibGraphics.

Referenced by Game::WaitingRoomMenu::Render(), and UI::RaylibButton::Render().

◆ DrawRectangle()

virtual void Graphics::IGraphics::DrawRectangle ( int  x,
int  y,
int  width,
int  height,
unsigned int  color 
)
pure virtual

Draw a filled rectangle (alias for DrawRectFilled)

Parameters
xX coordinate of the top-left corner
yY coordinate of the top-left corner
widthWidth of the rectangle
heightHeight of the rectangle
colorColor in 0xAARRGGBB format

Implemented in Graphics::RaylibGraphics.

Referenced by Game::ChatWidget::Render(), UI::RaylibSlider::Render(), and UI::RaylibTextInput::Render().

◆ DrawRectangleLines()

virtual void Graphics::IGraphics::DrawRectangleLines ( int  x,
int  y,
int  width,
int  height,
unsigned int  color 
)
pure virtual

Draw a rectangle outline (alias for DrawRect)

Parameters
xX coordinate of the top-left corner
yY coordinate of the top-left corner
widthWidth of the rectangle
heightHeight of the rectangle
colorColor in 0xAARRGGBB format

Implemented in Graphics::RaylibGraphics.

Referenced by Game::ChatWidget::Render(), and UI::RaylibTextInput::Render().

◆ DrawRectFilled()

virtual void Graphics::IGraphics::DrawRectFilled ( int  x,
int  y,
int  width,
int  height,
unsigned int  color 
)
pure virtual

Draw a filled rectangle.

Parameters
xX coordinate of the top-left corner
yY coordinate of the top-left corner
widthWidth of the rectangle
heightHeight of the rectangle
colorColor in 0xAARRGGBB format

Implemented in Graphics::RaylibGraphics.

Referenced by Game::LoginMenu::Render(), Game::WaitingRoomMenu::Render(), and UI::RaylibButton::Render().

◆ DrawText() [1/2]

virtual void Graphics::IGraphics::DrawText ( const char *  text,
int  x,
int  y,
int  fontSize,
unsigned int  color 
)
pure virtual

Draw text using default font (simplified version)

Parameters
textText string to render
xX coordinate for text position
yY coordinate for text position
fontSizeSize of the rendered text
colorText color in 0xAARRGGBB format

Implemented in Graphics::RaylibGraphics.

◆ DrawText() [2/2]

virtual void Graphics::IGraphics::DrawText ( int  fontHandle,
const char *  text,
int  x,
int  y,
int  fontSize,
unsigned int  color 
)
pure virtual

Draw text using a loaded font.

Parameters
fontHandleFont handle (or -1 for default font)
textText string to render
xX coordinate for text position
yY coordinate for text position
fontSizeSize of the rendered text
colorText color in 0xAARRGGBB format

Implemented in Graphics::RaylibGraphics.

Referenced by Game::ChatWidget::Render(), Game::AccessibilityMenu::Render(), Game::AddServerMenu::Render(), Game::ConnectionMenu::Render(), Game::CreateRoomMenu::Render(), Game::LoginMenu::Render(), Game::RoomListMenu::Render(), Game::ServerListMenu::Render(), Game::SettingsMenu::Render(), Game::WaitingRoomMenu::Render(), UI::RaylibButton::Render(), and UI::RaylibTextInput::Render().

◆ DrawTexture()

virtual void Graphics::IGraphics::DrawTexture ( const char *  textureName,
int  x,
int  y,
unsigned int  tint 
)
pure virtual

Draw a texture at the specified position.

Parameters
textureNameName of the texture to draw
xX coordinate for drawing position
yY coordinate for drawing position
tintTint color in 0xAARRGGBB format (0xFFFFFFFF for no tint)

Implemented in Graphics::RaylibGraphics.

◆ DrawTextureEx()

virtual void Graphics::IGraphics::DrawTextureEx ( const char *  textureName,
int  srcX,
int  srcY,
int  srcW,
int  srcH,
float  destX,
float  destY,
float  rotation,
float  scale,
unsigned int  tint 
)
pure virtual

Draw a texture with advanced parameters (rotation, scale, source rectangle)

Parameters
textureNameName of the texture to draw
srcXX coordinate of source rectangle in texture
srcYY coordinate of source rectangle in texture
srcWWidth of source rectangle
srcHHeight of source rectangle
destXX coordinate of destination position
destYY coordinate of destination position
rotationRotation angle in degrees
scaleScale factor (1.0 = original size)
tintTint color in 0xAARRGGBB format

Implemented in Graphics::RaylibGraphics.

◆ DrawTexturePro()

virtual void Graphics::IGraphics::DrawTexturePro ( const char *  textureName,
int  srcX,
int  srcY,
int  srcW,
int  srcH,
float  destX,
float  destY,
float  destW,
float  destH,
unsigned int  tint 
)
pure virtual

Draw a texture with separate width/height scaling (for non-uniform scaling)

Parameters
textureNameName of the texture to draw
srcXX coordinate of source rectangle in texture
srcYY coordinate of source rectangle in texture
srcWWidth of source rectangle
srcHHeight of source rectangle
destXX coordinate of destination position
destYY coordinate of destination position
destWWidth of destination rectangle
destHHeight of destination rectangle
tintTint color in 0xAARRGGBB format

Implemented in Graphics::RaylibGraphics.

◆ EndColorblindCapture()

virtual void Graphics::IGraphics::EndColorblindCapture ( )
pure virtual

End capturing and apply the colorblind filter.

Note
Must be called after all draw calls and before DisplayWindow()

Implemented in Graphics::RaylibGraphics.

◆ GetCharPressed()

virtual int Graphics::IGraphics::GetCharPressed ( ) const
pure virtual

Get the next character from the keyboard input queue.

Returns
Character code (0 if no character in queue)

Implemented in Graphics::RaylibGraphics.

Referenced by UI::RaylibTextInput::HandleCharacterInput().

◆ GetColorblindFilter()

virtual ColorblindFilterType Graphics::IGraphics::GetColorblindFilter ( ) const
pure virtual

Get the current colorblind filter type.

Returns
The currently active colorblind filter

Implemented in Graphics::RaylibGraphics.

◆ GetDeltaTime()

virtual float Graphics::IGraphics::GetDeltaTime ( ) const
pure virtual

Get the time elapsed for the last frame.

Returns
Delta time in seconds (time between current and previous frame)

Implemented in Graphics::RaylibGraphics.

Referenced by UI::RaylibTextInput::HandleBackspace(), and UI::RaylibTextInput::UpdateCursorBlink().

◆ GetFontHeight()

virtual int Graphics::IGraphics::GetFontHeight ( int  fontHandle,
int  fontSize 
)
pure virtual

Get the height of a font at a given size.

Parameters
fontHandleFont handle returned by LoadFont()
fontSizeSize to query
Returns
Height of the font in pixels

Implemented in Graphics::RaylibGraphics.

Referenced by UI::RaylibButton::Render().

◆ GetGamepadAxisMovement()

virtual float Graphics::IGraphics::GetGamepadAxisMovement ( int  gamepad,
int  axis 
) const
pure virtual

Get gamepad axis value (for analog sticks and triggers)

Parameters
gamepadGamepad index (0-3)
axisAxis code (use GAMEPAD_AXIS_* constants)
Returns
Axis value between -1.0 and 1.0 (0.0 for triggers at rest)

Implemented in Graphics::RaylibGraphics.

◆ GetMousePosition()

virtual void Graphics::IGraphics::GetMousePosition ( float &  x,
float &  y 
) const
pure virtual

Get the current mouse cursor position.

Parameters
xReference to store the X coordinate
yReference to store the Y coordinate

Implemented in Graphics::RaylibGraphics.

Referenced by UI::RaylibButton::IsMouseOver().

◆ GetMouseX()

virtual int Graphics::IGraphics::GetMouseX ( ) const
pure virtual

Get the current X position of the mouse cursor.

Returns
X coordinate in pixels

Implemented in Graphics::RaylibGraphics.

Referenced by UI::RaylibTextInput::IsMouseOver(), UI::RaylibSlider::IsMouseOverHandle(), UI::RaylibSlider::IsMouseOverTrack(), and UI::RaylibSlider::UpdateValueFromMouse().

◆ GetMouseY()

virtual int Graphics::IGraphics::GetMouseY ( ) const
pure virtual

Get the current Y position of the mouse cursor.

Returns
Y coordinate in pixels

Implemented in Graphics::RaylibGraphics.

Referenced by UI::RaylibTextInput::IsMouseOver(), UI::RaylibSlider::IsMouseOverHandle(), and UI::RaylibSlider::IsMouseOverTrack().

◆ GetScreenHeight()

virtual int Graphics::IGraphics::GetScreenHeight ( ) const
pure virtual

◆ GetScreenWidth()

◆ GetTextureSize()

virtual bool Graphics::IGraphics::GetTextureSize ( const char *  textureName,
int &  width,
int &  height 
) const
pure virtual

Get the dimensions of a loaded texture.

Parameters
textureNameName of the texture
widthReference to store the width
heightReference to store the height
Returns
true if texture exists and dimensions were retrieved, false otherwise

Implemented in Graphics::RaylibGraphics.

◆ GetTime()

virtual float Graphics::IGraphics::GetTime ( ) const
pure virtual

Get elapsed time since initialization.

Returns
Time in seconds since graphics system was initialized

Implemented in Graphics::RaylibGraphics.

◆ GetWindowHeight()

virtual int Graphics::IGraphics::GetWindowHeight ( ) const
pure virtual

Get current window height in pixels.

Returns
Height in pixels.

Implemented in Graphics::RaylibGraphics.

Referenced by UI::RaylibButton::ApplyAlignment(), and Game::KeyBindingsMenu::Initialize().

◆ GetWindowWidth()

virtual int Graphics::IGraphics::GetWindowWidth ( ) const
pure virtual

Get current window width in pixels.

Returns
Width in pixels.

Implemented in Graphics::RaylibGraphics.

Referenced by UI::RaylibButton::ApplyAlignment().

◆ InitAudioDevice()

virtual void Graphics::IGraphics::InitAudioDevice ( )
pure virtual

Initialize the audio device.

Note
Must be called before any audio operations

Implemented in Graphics::RaylibGraphics.

Referenced by Audio::SoundEffectManager::Initialize().

◆ InitWindow()

virtual void Graphics::IGraphics::InitWindow ( int  width,
int  height,
const char *  title 
)
pure virtual

Initialize the graphics window.

Parameters
widthWidth of the window in pixels
heightHeight of the window in pixels
titleTitle displayed on the window

Implemented in Graphics::RaylibGraphics.

◆ IsAudioDeviceReady()

virtual bool Graphics::IGraphics::IsAudioDeviceReady ( ) const
pure virtual

Check if audio device is ready.

Returns
true if audio device is initialized

Implemented in Graphics::RaylibGraphics.

Referenced by Audio::SoundEffectManager::Initialize().

◆ IsGamepadAvailable()

virtual bool Graphics::IGraphics::IsGamepadAvailable ( int  gamepad) const
pure virtual

Check if a gamepad is available/connected.

Parameters
gamepadGamepad index (0-3, typically 0 for first controller)
Returns
true if the gamepad is connected, false otherwise

Implemented in Graphics::RaylibGraphics.

Referenced by UI::RaylibMenu::HandleKeyboardNavigation().

◆ IsGamepadButtonDown()

virtual bool Graphics::IGraphics::IsGamepadButtonDown ( int  gamepad,
int  button 
) const
pure virtual

Check if a gamepad button is currently held down.

Parameters
gamepadGamepad index (0-3)
buttonButton code (use GAMEPAD_BUTTON_* constants)
Returns
true if the button is currently down, false otherwise

Implemented in Graphics::RaylibGraphics.

◆ IsGamepadButtonPressed()

virtual bool Graphics::IGraphics::IsGamepadButtonPressed ( int  gamepad,
int  button 
) const
pure virtual

Check if a gamepad button was pressed this frame.

Parameters
gamepadGamepad index (0-3)
buttonButton code (use GAMEPAD_BUTTON_* constants)
Returns
true if the button was just pressed, false otherwise

Implemented in Graphics::RaylibGraphics.

Referenced by UI::RaylibMenu::HandleKeyboardNavigation().

◆ IsKeyDown()

virtual bool Graphics::IGraphics::IsKeyDown ( int  key) const
pure virtual

Check if a key is currently being held down.

Parameters
keyKey code to check (implementation-specific key constants)
Returns
true if the key is currently down, false otherwise

Implemented in Graphics::RaylibGraphics.

Referenced by UI::RaylibTextInput::HandleBackspace(), UI::RaylibMenu::HandleKeyboardNavigation(), and UI::RaylibTextInput::HandlePaste().

◆ IsKeyPressed()

virtual bool Graphics::IGraphics::IsKeyPressed ( int  key) const
pure virtual

Check if a key was pressed (triggered once when key goes down)

Parameters
keyKey code to check (implementation-specific key constants)
Returns
true if the key was just pressed, false otherwise

Implemented in Graphics::RaylibGraphics.

Referenced by UI::RaylibTextInput::HandleBackspace(), UI::RaylibMenu::HandleKeyboardNavigation(), UI::RaylibTextInput::HandlePaste(), Game::LoginMenu::HandleTabNavigation(), and Game::LoginMenu::Update().

◆ IsKeyReleased()

virtual bool Graphics::IGraphics::IsKeyReleased ( int  key) const
pure virtual

Check if a key was released (triggered once when key goes up)

Parameters
keyKey code to check (implementation-specific key constants)
Returns
true if the key was just released, false otherwise

Implemented in Graphics::RaylibGraphics.

◆ IsMouseButtonDown()

virtual bool Graphics::IGraphics::IsMouseButtonDown ( int  button) const
pure virtual

Check if a mouse button is currently being held down.

Parameters
buttonMouse button code (implementation-specific button constants)
Returns
true if the button is currently down, false otherwise

Implemented in Graphics::RaylibGraphics.

Referenced by UI::RaylibButton::Update(), and UI::RaylibSlider::Update().

◆ IsMouseButtonPressed()

virtual bool Graphics::IGraphics::IsMouseButtonPressed ( int  button) const
pure virtual

Check if a mouse button was pressed (triggered once when button goes down)

Parameters
buttonMouse button code (implementation-specific button constants)
Returns
true if the button was just pressed, false otherwise

Implemented in Graphics::RaylibGraphics.

Referenced by UI::RaylibTextInput::HandleFocusClick(), and UI::RaylibSlider::Update().

◆ IsSoundPlaying()

virtual bool Graphics::IGraphics::IsSoundPlaying ( const char *  soundName) const
pure virtual

Check if a sound is currently playing.

Parameters
soundNameName of the sound to check
Returns
true if the sound is playing

Implemented in Graphics::RaylibGraphics.

◆ IsWindowOpen()

virtual bool Graphics::IGraphics::IsWindowOpen ( ) const
pure virtual

Check if the window is still open.

Returns
true if the window should remain open, false if close was requested

Implemented in Graphics::RaylibGraphics.

◆ LoadFont()

virtual int Graphics::IGraphics::LoadFont ( const char *  filepath,
int  size 
)
pure virtual

Load a font from file.

Parameters
filepathPath to the font file (e.g., .ttf, .otf)
sizeFont size to load
Returns
Font handle (integer ID) for use in drawing operations

Implemented in Graphics::RaylibGraphics.

◆ LoadSound()

virtual bool Graphics::IGraphics::LoadSound ( const char *  soundName,
const char *  filepath 
)
pure virtual

Load a sound from file.

Parameters
soundNameUnique name to identify the sound
filepathPath to the sound file (e.g., .wav, .mp3, .ogg)
Returns
true if sound was loaded successfully, false otherwise

Implemented in Graphics::RaylibGraphics.

Referenced by Audio::SoundEffectManager::LoadSounds().

◆ LoadTexture()

virtual int Graphics::IGraphics::LoadTexture ( const char *  textureName,
const char *  filepath 
)
pure virtual

Load a texture from an image file.

Parameters
filepathPath to the image file (e.g., .png, .jpg)
Returns
Texture handle (integer ID) for use in drawing operations

Implemented in Graphics::RaylibGraphics.

◆ PlaySound()

virtual void Graphics::IGraphics::PlaySound ( const char *  soundName)
pure virtual

◆ SetClearColor()

virtual void Graphics::IGraphics::SetClearColor ( unsigned int  color)
pure virtual

Set the background clear color.

Parameters
colorColor in 0xAARRGGBB format (Alpha, Red, Green, Blue)

Implemented in Graphics::RaylibGraphics.

◆ SetColorblindFilter()

virtual void Graphics::IGraphics::SetColorblindFilter ( ColorblindFilterType  filter)
pure virtual

Set the colorblind filter type.

Parameters
filterThe type of colorblind filter to apply

Implemented in Graphics::RaylibGraphics.

◆ SetSoundVolume()

virtual void Graphics::IGraphics::SetSoundVolume ( const char *  soundName,
float  volume 
)
pure virtual

Set volume for a specific sound.

Parameters
soundNameName of the sound
volumeVolume level (0.0 to 1.0)

Implemented in Graphics::RaylibGraphics.

Referenced by Audio::SoundEffectManager::ApplyVolumeToAllSounds().

◆ SetTargetFPS()

virtual void Graphics::IGraphics::SetTargetFPS ( int  fps)
pure virtual

Set the target frames per second for rendering.

Parameters
fpsTarget frame rate (e.g., 60 for 60 FPS)

Implemented in Graphics::RaylibGraphics.

◆ SetWindowSize()

virtual void Graphics::IGraphics::SetWindowSize ( int  width,
int  height 
)
pure virtual

Resize the window.

Parameters
widthNew width in pixels
heightNew height in pixels

Implemented in Graphics::RaylibGraphics.

◆ SetWindowTitle()

virtual void Graphics::IGraphics::SetWindowTitle ( const char *  title)
pure virtual

Change the window title.

Parameters
titleNew title for the window

Implemented in Graphics::RaylibGraphics.

◆ StartDrawing()

virtual void Graphics::IGraphics::StartDrawing ( )
pure virtual

Begin drawing frame (setup canvas for drawing operations)

Implemented in Graphics::RaylibGraphics.

◆ TakeScreenshot()

virtual void Graphics::IGraphics::TakeScreenshot ( const char *  filepath)
pure virtual

Capture the current screen and save it to a file.

Parameters
filepathPath where the screenshot will be saved

Implemented in Graphics::RaylibGraphics.

◆ ToggleFullScreen()

virtual void Graphics::IGraphics::ToggleFullScreen ( )
pure virtual

Toggle between fullscreen and windowed mode.

Implemented in Graphics::RaylibGraphics.

◆ UnloadFont()

virtual void Graphics::IGraphics::UnloadFont ( int  fontHandle)
pure virtual

Unload a previously loaded font.

Parameters
fontHandleFont handle returned by LoadFont()

Implemented in Graphics::RaylibGraphics.

◆ UnloadSound()

virtual void Graphics::IGraphics::UnloadSound ( const char *  soundName)
pure virtual

Unload a previously loaded sound.

Parameters
soundNameName of the sound to unload

Implemented in Graphics::RaylibGraphics.

Referenced by Audio::SoundEffectManager::~SoundEffectManager().

◆ UnloadTexture()

virtual void Graphics::IGraphics::UnloadTexture ( const char *  textureName)
pure virtual

Unload a previously loaded texture.

Parameters
textureNameName of the texture to unload

Implemented in Graphics::RaylibGraphics.

◆ UpdateTexture()

virtual void Graphics::IGraphics::UpdateTexture ( const char *  textureName,
const void *  pixels 
)
pure virtual

Update an existing texture with new pixel data.

Parameters
textureNameName of the texture to update
pixelsPointer to new pixel data

Implemented in Graphics::RaylibGraphics.

◆ WindowShouldClose()

virtual bool Graphics::IGraphics::WindowShouldClose ( ) const
pure virtual

Check if the window should close.

Returns
true if the window should close, false otherwise

Implemented in Graphics::RaylibGraphics.


The documentation for this class was generated from the following file: