Add backbuffer

This commit is contained in:
2025-08-22 23:30:23 -05:00
parent 995bbe1acd
commit 1bf6fe6eaf
13 changed files with 413 additions and 2 deletions

View File

@@ -8,10 +8,11 @@
#include "scenetest.h"
#include "scene/node.h"
#include "display/camera.h"
#include "display/display.h"
#include "display/mesh/meshrenderer.h"
#include "display/mesh/quad.h"
texture_t test;
void sceneTestAdd(void) {
// Initialize the entity with a camera component
ecsid_t camera = ecsEntityAdd();
@@ -27,9 +28,16 @@ void sceneTestAdd(void) {
);
nodeMatrixSet(camera, lookAt);
color4b_t pixels[4] = {
COLOR_RED, COLOR_GREEN,
COLOR_BLUE, COLOR_WHITE
};
textureInit(&test, 2, 2, TEXTURE_FORMAT_RGBA, pixels);
// Test cube
ecsid_t cube = ecsEntityAdd();
node = nodeAdd(cube);
meshrenderer_t *renderer = meshRendererAdd(cube);
renderer->mesh = &QUAD_MESH_SIMPLE;
renderer->texture = &test;
}