NoJobEngine
2.0.7
Toggle main menu visibility
Loading...
Searching...
No Matches
VertexArray.h
Go to the documentation of this file.
1
6
#pragma once
7
8
#include "
Engine/Renderer/BufferLayout.h
"
9
10
#include <memory>
11
12
namespace
NoJob
13
{
14
class
VertexBuffer
;
15
class
IndexBuffer
;
16
17
class
VertexArray
18
{
19
public
:
20
virtual
~VertexArray
() =
default
;
21
22
virtual
void
Bind
()
const
= 0;
23
virtual
void
Unbind
()
const
= 0;
24
25
// Legacy position-only path used by the editor grid.
26
virtual
void
SetVertexBuffer
(
27
const
std::shared_ptr<VertexBuffer>& vertexBuffer) = 0;
28
29
// Generic interleaved vertex layout used by meshes.
30
virtual
void
SetVertexBuffer
(
31
const
std::shared_ptr<VertexBuffer>& vertexBuffer,
32
const
BufferLayout
& layout) = 0;
33
34
virtual
void
SetIndexBuffer
(
35
const
std::shared_ptr<IndexBuffer>& indexBuffer) = 0;
36
37
virtual
const
std::shared_ptr<IndexBuffer>&
38
GetIndexBuffer
()
const
= 0;
39
40
static
std::shared_ptr<VertexArray>
Create
();
41
};
42
}
BufferLayout.h
BufferLayout declarations for the Rendering subsystem.
NoJob::BufferLayout
Definition
BufferLayout.h:71
NoJob::IndexBuffer
Definition
Buffer.h:25
NoJob::VertexArray
Definition
VertexArray.h:18
NoJob::VertexArray::Create
static std::shared_ptr< VertexArray > Create()
Definition
VertexArray.cpp:8
NoJob::VertexArray::Bind
virtual void Bind() const =0
NoJob::VertexArray::SetIndexBuffer
virtual void SetIndexBuffer(const std::shared_ptr< IndexBuffer > &indexBuffer)=0
NoJob::VertexArray::GetIndexBuffer
virtual const std::shared_ptr< IndexBuffer > & GetIndexBuffer() const =0
NoJob::VertexArray::SetVertexBuffer
virtual void SetVertexBuffer(const std::shared_ptr< VertexBuffer > &vertexBuffer)=0
NoJob::VertexArray::~VertexArray
virtual ~VertexArray()=default
NoJob::VertexArray::SetVertexBuffer
virtual void SetVertexBuffer(const std::shared_ptr< VertexBuffer > &vertexBuffer, const BufferLayout &layout)=0
NoJob::VertexArray::Unbind
virtual void Unbind() const =0
NoJob::VertexBuffer
Definition
Buffer.h:13
NoJob
Definition
BTActionNode.h:13
Engine
Renderer
VertexArray.h
Generated by
1.18.0