implemented CRTP shader on ColorShader and Rectangle
This commit is contained in:
@@ -7,11 +7,11 @@
|
||||
#include "../buffer.cpp"
|
||||
|
||||
namespace UwU {
|
||||
template <typename Derived>
|
||||
template <class ShaderT>
|
||||
class ShaderBase {
|
||||
public:
|
||||
Color shade(uint16_t x, uint16_t y) {
|
||||
return static_cast<Derived*>(this)->shade(x, y);
|
||||
return static_cast<ShaderT*>(this)->shade(x, y);
|
||||
}
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user