cae  0.0.0
Cross-API graphics engine
Loading...
Searching...
No Matches
VULKN.hpp
Go to the documentation of this file.
1///
2/// @file VULKN.hpp
3/// @brief This file contains the VULKN class declaration
4/// @namespace cae
5///
6
7#pragma once
8
10
11#include <glm/glm.hpp>
12
13namespace cae
14{
15
16 ///
17 /// @class VULKN
18 /// @brief Class for the Vulkan plugin
19 /// @namespace cae
20 ///
21 class VULKN final : public ARenderer
22 {
23
24 public:
25 VULKN() = default;
26 ~VULKN() override = default;
27
28 VULKN(const VULKN &) = delete;
29 VULKN &operator=(const VULKN &) = delete;
30 VULKN(VULKN &&) = delete;
31 VULKN &operator=(VULKN &&) = delete;
32
33 [[nodiscard]] std::string getName() const override { return "Vulkan"; }
34 [[nodiscard]] utl::PluginType getType() const override { return utl::PluginType::RENDERER; }
35 [[nodiscard]] utl::PluginPlatform getPlatform() const override { return utl::PluginPlatform::ALL; }
36
37 void setVSyncEnabled(bool enabled) override {}
38 void setClearColor(const Color &color) override {}
39
40 [[nodiscard]] bool isVSyncEnabled() const override { return false; }
41
42 void initialize(const NativeWindowHandle &nativeWindowHandle, const Color &clearColor) override {}
43 void createPipeline(const ShaderID &id, const ShaderIRModule &vertex,
44 const ShaderIRModule &fragment) override
45 {
46 }
47 void draw(const WindowSize &windowSize, const ShaderID &shaderId, glm::mat4 mvp) override {}
48 void createMesh(const std::vector<float> &vertices) override {}
49
50 }; // class VULKN
51
52} // namespace cae
This file contains the Renderer abstract class.
Abstract class for renderer.
Definition ARenderer.hpp:20
Class for the Vulkan plugin.
Definition VULKN.hpp:22
VULKN(VULKN &&)=delete
void draw(const WindowSize &windowSize, const ShaderID &shaderId, glm::mat4 mvp) override
Draw the scene using the specified shader and window size.
Definition VULKN.hpp:47
void createMesh(const std::vector< float > &vertices) override
Create a mesh with the given vertex data.
Definition VULKN.hpp:48
void initialize(const NativeWindowHandle &nativeWindowHandle, const Color &clearColor) override
Initialize the renderer with a native window handle and clear color.
Definition VULKN.hpp:42
VULKN(const VULKN &)=delete
~VULKN() override=default
utl::PluginType getType() const override
Get the type of the plugin.
Definition VULKN.hpp:34
void setVSyncEnabled(bool enabled) override
Enable or disable VSync.
Definition VULKN.hpp:37
std::string getName() const override
Get the name of the plugin.
Definition VULKN.hpp:33
VULKN & operator=(const VULKN &)=delete
VULKN & operator=(VULKN &&)=delete
utl::PluginPlatform getPlatform() const override
Get the handled platform of the plugin.
Definition VULKN.hpp:35
void setClearColor(const Color &color) override
Set the clear color.
Definition VULKN.hpp:38
void createPipeline(const ShaderID &id, const ShaderIRModule &vertex, const ShaderIRModule &fragment) override
Create a rendering pipeline with vertex and fragment shaders.
Definition VULKN.hpp:43
VULKN()=default
bool isVSyncEnabled() const override
Check if VSync is enabled.
Definition VULKN.hpp:40
std::string ShaderID
PluginPlatform
Definition IPlugin.hpp:33
PluginType
Definition IPlugin.hpp:22
Struct for color.
Definition IRenderer.hpp:23
Struct for native window handle.
Definition IWindow.hpp:34
Struct for shader intermediate representation module.
Struct for window size.
Definition IWindow.hpp:23