Monad Engine da02fba2
> Undercity Codex_
Loading...
Searching...
No Matches
RenderQueue.h
Go to the documentation of this file.
1#pragma once
2
3#include "Common.h"
4#include <glm/mat4x4.hpp>
5#include <vector>
6#include <memory>
7
8namespace eng
9{
10 class Mesh;
11 class Material;
12 class GraphicsAPI;
13 class Texture;
14
16 {
17 Mesh* mesh = nullptr;
18 Material* material = nullptr;
19 glm::mat4 modelMatrix;
20 };
21
23 {
24 glm::mat4 modelMatrix;
25 Texture* texture = nullptr;
26 glm::vec4 color;
27 glm::vec2 size;
28 glm::vec2 lowerLeftUV;
29 glm::vec2 upperRightUV;
30 glm::vec2 pivot;
31 };
32
34 {
35 public:
36 void Init();
37 void Submit(const RenderCommand& command);
38 void Submit(const RenderCommand2D& command);
39 void Draw(GraphicsAPI& graphicsAPI, const CameraData& cameraData, const std::vector<LightData>& lights);
40
41 private:
42 std::vector<RenderCommand> m_commands;
43 std::vector<RenderCommand2D> m_commands2D;
44 std::shared_ptr<Mesh> m_mesh2D;
45 };
46}
void Submit(const RenderCommand &command)
void Draw(GraphicsAPI &graphicsAPI, const CameraData &cameraData, const std::vector< LightData > &lights)
Material * material
Definition RenderQueue.h:18
glm::mat4 modelMatrix
Definition RenderQueue.h:19