stubbed out shaders

This commit is contained in:
2026-07-07 07:46:27 -07:00
parent aa49a32ace
commit 1fce028eea
8 changed files with 47 additions and 172 deletions
+3 -2
View File
@@ -5,6 +5,7 @@
#include "datatypes.cpp"
#include "helpers.cpp"
#include "buffer.cpp"
#include "shaders/shader.cpp"
namespace UwU {
// rectangle
@@ -23,11 +24,11 @@ namespace UwU {
uint16_t y1;
// Draw a rectangle
void draw (Buffer buffer, Color color) {
void draw (Buffer buffer, Shader shader) {
if (x0 > buffer.width || y0 > buffer.height || x1 > buffer.width || y1 > buffer.height) {return;};
for (uint16_t y = y0; y < y1; y++) {
for (uint16_t x = x0; x < x1; x++) {
buffer.drawPixel(Coord2(x, y), color);
buffer.drawPixelShader(Coord2(x, y), shader);
}
}
return;