Made a big mess of the codebase

This commit is contained in:
2025-08-28 07:14:13 -05:00
parent 30232d1275
commit af1329710d
44 changed files with 1363 additions and 388 deletions

View File

@@ -6,29 +6,27 @@
*/
#include "renderer.h"
#include "display/mesh/meshrenderer.h"
#include "scene/node.h"
#include "display/framebuffer/framebuffer.h"
void rendererRender(const ecsid_t camera) {
if(camera == -1) return;
// void rendererRender(const ecsid_t camera) {
// if(camera == -1) return;
// Get the meshes.
uint32_t meshCount;
ecsid_t meshes[ECS_ENTITY_COUNT_MAX];
ecsid_t id;
meshCount = meshRendererGetAll(meshes);
// // Get the meshes.
// uint32_t meshCount;
// ecsid_t meshes[ECS_ENTITY_COUNT_MAX];
// ecsid_t id;
// meshCount = meshRendererGetAll(meshes);
frameBufferBind(NULL);
frameBufferClear(
FRAMEBUFFER_CLEAR_COLOR | FRAMEBUFFER_CLEAR_DEPTH,
COLOR_CORNFLOWER_BLUE
);
cameraPush(camera);
for(uint32_t i = 0; i < meshCount; i++) {
id = meshes[i];
nodeMatrixPush(id);
meshRendererDraw(id);
}
cameraPop();
}
// frameBufferBind(NULL);
// frameBufferClear(
// FRAMEBUFFER_CLEAR_COLOR | FRAMEBUFFER_CLEAR_DEPTH,
// COLOR_CORNFLOWER_BLUE
// );
// cameraPush(camera);
// for(uint32_t i = 0; i < meshCount; i++) {
// id = meshes[i];
// nodeMatrixPush(id);
// meshRendererDraw(id);
// }
// cameraPop();
// }