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.h
Go to the documentation of this file.
1#pragma once
7
8#include <map>
9
16 public:
17 explicit RenderingService();
18 explicit RenderingService(Renderer* renderer);
19 ~RenderingService() override = default;
26 void draw(
27 std::map<int, std::multimap<int, std::reference_wrapper<Renderable>>>&
28 objects,
29 Scene& scene);
35
40 [[nodiscard]] bool vsync() const;
41
46 void vsync(bool enabled);
47
49
50 private:
51 friend class AssetService;
52 const std::unique_ptr<Renderer> renderer_;
53 const std::unique_ptr<IRenderingStrategyFactory> strategy_factory_;
54};
Service responsible for managing game assets such as textures and spritesheets.
Definition assetService.h:20
Definition iEngineService.h:4
Interface for factories that create rendering strategies.
Definition irendering_strategy_factory.h:18
Service responsible for rendering game objects to the screen.
Definition renderer.h:25
Service responsible for rendering game objects to the window. This service functions as a manager for...
Definition renderingService.h:15
bool vsync() const
Checks if vertical synchronization (VSync).
~RenderingService() override=default
void vsync(bool enabled)
Toggles vertical synchronization (VSync) which limits fps to the monitor's refresh rate.
Window & window()
Provides access to the game window.
IRenderingStrategyFactory & rendering_strategy_factory() const
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 ...
RenderingService(Renderer *renderer)
Represents a scene within the engine. A scene contains multiple GameObjects and manages their lifecyc...
Definition scene.h:19
Represents the game window and provides methods to modify its properties. The window encapsulates an ...
Definition window.h:15