44 lines
867 B
C++
44 lines
867 B
C++
//
|
|
// Created by sebastian on 29.07.26.
|
|
//
|
|
|
|
#ifndef COLORRACE_RENDERQUEUE_H
|
|
#define COLORRACE_RENDERQUEUE_H
|
|
#include <iostream>
|
|
#include <memory>
|
|
#include <ostream>
|
|
|
|
#include "glm/glm.hpp"
|
|
#include "loader/models/Model.h"
|
|
|
|
namespace engine {
|
|
struct RenderCommand {
|
|
std::shared_ptr<engine::Model> mesh;
|
|
glm::mat4 transformationMatrix;
|
|
glm::vec3 tintColor{0.0};
|
|
float tintIntensity{0.f};
|
|
};
|
|
|
|
class RenderQueue {
|
|
public:
|
|
void submit(RenderCommand cmd) {
|
|
m_renderCommands.push_back(std::move(cmd));
|
|
}
|
|
|
|
[[nodiscard]] const auto& getRenderCommands() const {
|
|
return m_renderCommands;
|
|
}
|
|
|
|
void clear() {
|
|
m_renderCommands.clear();
|
|
}
|
|
|
|
private:
|
|
std::vector<RenderCommand> m_renderCommands;
|
|
};
|
|
}
|
|
|
|
|
|
|
|
#endif //COLORRACE_RENDERQUEUE_H
|