Capycore Engine  0.1.0
A simple and lightweight game engine written in C++ based on the Unity API architecture.
Loading...
Searching...
No Matches
RenderingService Class Reference

Service responsible for rendering game objects to the window. This service functions as a manager for the Renderer, and also as a face to work with the game window via a window property. More...

#include <renderingService.h>

Inheritance diagram for RenderingService:
[legend]

Public Member Functions

 RenderingService ()
 
 RenderingService (Renderer *renderer)
 
 ~RenderingService () override=default
 
void draw (std::map< int, std::multimap< int, std::reference_wrapper< Renderable > > > &objects, Scene &scene)
 Draws the provided game objects to the window using the renderer. Delegates the drawing operation to the Renderer instance.
 
Windowwindow ()
 Provides access to the game window.
 
bool vsync () const
 Checks if vertical synchronization (VSync).
 
void vsync (bool enabled)
 Toggles vertical synchronization (VSync) which limits fps to the monitor's refresh rate.
 
IRenderingStrategyFactoryrendering_strategy_factory () const
 
- Public Member Functions inherited from IEngineService
virtual ~IEngineService ()=default
 

Friends

class AssetService
 

Detailed Description

Service responsible for rendering game objects to the window. This service functions as a manager for the Renderer, and also as a face to work with the game window via a window property.

Constructor & Destructor Documentation

◆ RenderingService() [1/2]

RenderingService::RenderingService ( )
explicit

◆ RenderingService() [2/2]

RenderingService::RenderingService ( Renderer renderer)
explicit

◆ ~RenderingService()

RenderingService::~RenderingService ( )
overridedefault

Member Function Documentation

◆ draw()

void RenderingService::draw ( std::map< int, std::multimap< int, std::reference_wrapper< Renderable > > > &  objects,
Scene scene 
)

Draws the provided game objects to the window using the renderer. Delegates the drawing operation to the Renderer instance.

Parameters
objectsA vector of references to GameObject instances to be drawn.
sceneThe current scene context for rendering.

◆ rendering_strategy_factory()

IRenderingStrategyFactory & RenderingService::rendering_strategy_factory ( ) const

◆ vsync() [1/2]

bool RenderingService::vsync ( ) const

Checks if vertical synchronization (VSync).

Returns
true if VSync is enabled, false otherwise.

◆ vsync() [2/2]

void RenderingService::vsync ( bool  enabled)

Toggles vertical synchronization (VSync) which limits fps to the monitor's refresh rate.

◆ window()

Window & RenderingService::window ( )

Provides access to the game window.

Returns
A reference to the Window instance managed by the Renderer.

Friends And Related Symbol Documentation

◆ AssetService

friend class AssetService
friend

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