NoJobEngine
2.0.7
Toggle main menu visibility
Loading...
Searching...
No Matches
RendererAPI.h
Go to the documentation of this file.
1
6
#pragma once
7
#include <cstdint>
8
9
namespace
NoJob
10
{
11
class
VertexArray
;
12
13
enum class
GraphicsAPI
14
{
15
None = 0,
16
OpenGL
,
17
Vulkan
18
};
19
20
class
RendererAPI
21
{
22
public
:
23
virtual
~RendererAPI
() =
default
;
24
25
virtual
void
Init
() = 0;
26
27
virtual
void
SetViewport
(
28
std::uint32_t x,
29
std::uint32_t y,
30
std::uint32_t width,
31
std::uint32_t height) = 0;
32
33
virtual
void
SetClearColor
(
34
float
r,
float
g,
float
b,
float
a) = 0;
35
36
virtual
void
Clear
() = 0;
37
38
virtual
void
DrawIndexed
(
39
const
VertexArray
& vertexArray) = 0;
40
virtual
void
DrawIndexedRange
(
41
const
VertexArray
& vertexArray,
42
std::uint32_t indexCount,
43
std::uint32_t indexOffset) = 0;
44
45
virtual
void
DrawLines
(
46
const
VertexArray
& vertexArray,
47
std::uint32_t vertexCount) = 0;
48
49
static
GraphicsAPI
GetAPI
() {
return
s_API
; }
50
51
protected
:
52
static
GraphicsAPI
s_API
;
53
};
54
}
NoJob::RendererAPI
Definition
RendererAPI.h:21
NoJob::RendererAPI::SetClearColor
virtual void SetClearColor(float r, float g, float b, float a)=0
NoJob::RendererAPI::Init
virtual void Init()=0
NoJob::RendererAPI::DrawIndexed
virtual void DrawIndexed(const VertexArray &vertexArray)=0
NoJob::RendererAPI::s_API
static GraphicsAPI s_API
Definition
RendererAPI.h:52
NoJob::RendererAPI::DrawLines
virtual void DrawLines(const VertexArray &vertexArray, std::uint32_t vertexCount)=0
NoJob::RendererAPI::GetAPI
static GraphicsAPI GetAPI()
Definition
RendererAPI.h:49
NoJob::RendererAPI::Clear
virtual void Clear()=0
NoJob::RendererAPI::SetViewport
virtual void SetViewport(std::uint32_t x, std::uint32_t y, std::uint32_t width, std::uint32_t height)=0
NoJob::RendererAPI::~RendererAPI
virtual ~RendererAPI()=default
NoJob::RendererAPI::DrawIndexedRange
virtual void DrawIndexedRange(const VertexArray &vertexArray, std::uint32_t indexCount, std::uint32_t indexOffset)=0
NoJob::VertexArray
Definition
VertexArray.h:18
NoJob
Definition
BTActionNode.h:13
NoJob::GraphicsAPI
GraphicsAPI
Definition
RendererAPI.h:14
NoJob::GraphicsAPI::Vulkan
@ Vulkan
Definition
RendererAPI.h:17
NoJob::GraphicsAPI::OpenGL
@ OpenGL
Definition
RendererAPI.h:16
Engine
Renderer
RendererAPI.h
Generated by
1.18.0