Elevate Engine 1
Loading...
Searching...
No Matches
RenderCommand.h
Go to the documentation of this file.
1#pragma once
2
3#include <memory>
4#include <glm/mat4x4.hpp>
5
8
9namespace Elevate
10{
11 class Shader;
12 class Material;
13
15 {
16 uint64_t m_SortingKey = 0;
17 // GEOMETRY
20 glm::mat4 Transform = glm::mat4(1.0f);
21 // GPU STATE
23
24 RenderCommand() = default;
25 RenderCommand(const std::shared_ptr<Material>& material, const std::shared_ptr<Elevate::VertexArray>& vertexArray, const glm::mat4& transform, const RenderState& state)
26 : m_MaterialInstance(material.get()), m_VertexArray(vertexArray.get()), Transform(transform), m_State(state), m_SortingKey(GetSortKey()) { }
27
28 public:
29 uint64_t GetSortKey() const;
30 };
31}
uint64_t GetSortKey() const
Material * m_MaterialInstance
VertexArray * m_VertexArray
RenderCommand(const std::shared_ptr< Material > &material, const std::shared_ptr< Elevate::VertexArray > &vertexArray, const glm::mat4 &transform, const RenderState &state)