cleaned up renderer

This commit is contained in:
Jorijn van der Graaf 2026-03-09 20:10:19 +01:00
commit d661c88ee2
58 changed files with 3030 additions and 4722 deletions

View file

@ -2,18 +2,19 @@ import Crafter.Graphics;
import std;
using namespace Crafter;
constexpr std::uint32_t width = 1280;
constexpr std::uint32_t height = 720;
int main() {
constexpr std::uint_fast32_t width = 1280;
constexpr std::uint_fast32_t height = 720;
Device::Initialize();
Window window(width, height, "Hello Drawing!");
WindowWayland window(width, height, "Hello Drawing!");
for(std::uint_fast32_t x = 0; x < width; x++) {
for(std::uint_fast32_t y = 0; y < height; y++) {
window.framebuffer[x*height+y].r = 255;
window.framebuffer[x*height+y].g = 0;
window.framebuffer[x*height+y].b = 0;
window.framebuffer[x*height+y].a = 255;
for(std::uint32_t x = 0; x < width; x++) {
for(std::uint32_t y = 0; y < height; y++) {
window.renderer.buffer[x*height+y].r = 255;
window.renderer.buffer[x*height+y].g = 0;
window.renderer.buffer[x*height+y].b = 0;
window.renderer.buffer[x*height+y].a = 255;
}
}

View file

@ -7,9 +7,10 @@
"dependencies": [
{
"path":"../../project.json",
"configuration":"lib-wayland"
"configuration":"lib-wayland-debug"
}
]
],
"debug": true
}
]
}