diff --git a/TODO b/TODO index ce0fb89..d7c9132 100644 --- a/TODO +++ b/TODO @@ -8,4 +8,8 @@ [ ] implement more primatives [ ] fix off by one with buffer shader (and probably certain primatives) [ ] fix memory leak and arrays in stack issue -[ ] fix shader offset limitations and headache \ No newline at end of file +[ ] fix shader offset limitations and headache +[ ] maybe add blitter primative? +[ ] support for lower color depths +[ ] support for transparency +[ ] 15bpp + dither "shader" \ No newline at end of file diff --git a/shaders/colorshader.cpp b/shaders/colorshader.cpp new file mode 100644 index 0000000..ad0ccc1 --- /dev/null +++ b/shaders/colorshader.cpp @@ -0,0 +1,22 @@ +#pragma once + +#include + +#include "../datatypes.cpp" +#include "../helpers.cpp" +#include "../buffer.cpp" +#include "shaderbase.cpp" + +namespace UwU { + class ColorShader : public ShaderBase { + public: + ColorShader(Color c) { + this->c = c; + } + Color c; + + Color shade(uint16_t x, uint16_t y) { + return c; + } + }; +} \ No newline at end of file diff --git a/shaders/shaderbase.cpp b/shaders/shaderbase.cpp new file mode 100644 index 0000000..fcccfbc --- /dev/null +++ b/shaders/shaderbase.cpp @@ -0,0 +1,17 @@ +#pragma once + +#include + +#include "../datatypes.cpp" +#include "../helpers.cpp" +#include "../buffer.cpp" + +namespace UwU { + template + class ShaderBase { + public: + Color shade(uint16_t x, uint16_t y) { + return static_cast(this)->shade(x, y); + } + }; +} \ No newline at end of file