Etterna 0.75.1
Loading...
Searching...
No Matches
CommandBatcher.h
1#ifndef DISPLAY_COMMAND_BATCHER_H
2#define DISPLAY_COMMAND_BATCHER_H
3
4#include <queue>
5#include <stack>
6#include <string>
7#include <map>
8#include <optional>
9#include "DrawMode.h"
10#include "MatrixState.h"
11#include "RenderState.h"
12#include "RenderNode.h"
13#include "Vertex.h"
14
15namespace DisplayAdapter {
16
18{
19 public:
20 void InsertPipelineChangeCommand(
21 intptr_t pipeline,
22 const std::vector<uint8_t>& vertexShaderArgs,
23 const std::vector<uint8_t>& fragShaderArgs,
24 bool persist);
25 void InsertRenderTargetCommand(intptr_t renderTarget, bool preserveTexture);
26 void InsertSpriteDrawCommand(DrawMode drawMode,
27 MatrixState&& matrixState,
28 const RageSpriteVertex* vertexData,
29 int vertexCount,
30 const RenderState& renderState);
31 void InsertCompiledGeometryDrawCommand(MatrixState&& matrixState,
32 const RageCompiledGeometry* p,
33 int iMeshIndex,
34 const RenderState& renderState);
35 void HandleDrawCommand(int indexOffset,
36 int indexCount,
37 const RenderState& renderState);
38 void Clear();
39 void FixRenderNodeOrder();
40
41 std::vector<Vertex> m_VertexBuffer;
42 std::vector<uint32_t> m_IndexBuffer;
43 std::vector<MatrixState> m_MatrixStateBuffer;
44 std::vector<RenderNode> m_RenderNodes;
45 std::stack<PipelineSettings> m_PipelineStack;
46 std::vector<uint8_t> m_ShaderScratchBuffer;
47
48 std::optional<size_t> m_SwapchainNodeIndex;
49 size_t m_CurrentNodeIndex = 0;
50
51 std::optional<PipelineSettings> m_CurrentPipeline = std::nullopt;
52};
53
54} // namespace Display
55
56#endif
Definition CommandBatcher.h:18
Definition RageDisplay.h:35
Definition MatrixState.h:9
Definition RenderState.h:10
Definition RageTypes.h:557