Karma Engine
Loading...
Searching...
No Matches
VertexArray.h
1#pragma once
2
3#include "krpch.h"
4
5#include "Karma/Renderer/Buffer.h"
6#include "Karma/Renderer/Shader.h"
7#include "Karma/Renderer/Mesh.h"
8#include "Karma/Renderer/Material.h"
9
10namespace Karma
11{
12 class KARMA_API VertexArray
13 {
14 public:
15 virtual ~VertexArray()
16 {
17 }
18
19 virtual void Bind() const = 0;
20 virtual void UnBind() const = 0;
21
22 // For legacy purposes. Use Mesh abstraction.
23 virtual void AddVertexBuffer(const std::shared_ptr<VertexBuffer>& vertexBuffer) = 0;
24 virtual void SetIndexBuffer(const std::shared_ptr<IndexBuffer>& indexBuffer) = 0;
25 virtual const std::vector<std::shared_ptr<VertexBuffer>>& GetVertexBuffers() const = 0;
26 virtual const IndexBuffer* GetIndexBuffer() const = 0;
27
28 virtual void SetMesh(std::shared_ptr<Mesh> mesh) = 0;
29
30 // For legacy purposes. Use Material abstraction.
31 virtual void SetShader(std::shared_ptr<Shader> shader) = 0;
32
33 virtual void SetMaterial(std::shared_ptr<Material> material) = 0;
34
35 virtual void UpdateProcessAndSetReadyForSubmission() const = 0;
36
37 // Getters
38 //virtual std::shared_ptr<Mesh> GetMesh() const = 0;
39 virtual std::shared_ptr<Material> GetMaterial() const = 0;
40
41 static VertexArray* Create();
42 };
43}
Definition Buffer.h:181
Definition VertexArray.h:13