Immediate mode vertex submission attempt 1

This commit is contained in:
wheremyfoodat 2023-03-06 01:43:39 +02:00
parent 6ecdf71dbc
commit 922424b8d0
4 changed files with 61 additions and 10 deletions

View file

@ -22,6 +22,11 @@ class GPU {
std::array<u32, regNum> regs; // GPU internal registers
std::array<vec4f, 16> currentAttributes; // Vertex attributes before being passed to the shader
std::array<vec4f, 16> immediateModeAttributes; // Vertex attributes uploaded via immediate mode submission
std::array<Vertex, 3> immediateModeVertices;
uint immediateModeVertIndex;
uint immediateModeAttrIndex; // Index of the immediate mode attribute we're uploading
template <bool indexed>
void drawArrays();
@ -53,7 +58,7 @@ class GPU {
std::array<u32, 3> fixedAttrBuff; // Buffer to hold fixed attributes in until they get submitted
Renderer renderer;
Vertex getImmediateModeVertex();
public:
GPU(Memory& mem);
void initGraphicsContext() { renderer.initGraphicsContext(); }