diff options
Diffstat (limited to 'src/fb/chfb.h')
-rw-r--r-- | src/fb/chfb.h | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/src/fb/chfb.h b/src/fb/chfb.h index 280f6d8..7c786fc 100644 --- a/src/fb/chfb.h +++ b/src/fb/chfb.h @@ -2,25 +2,35 @@ #define FB_CHFB_H #include <vector> -#include "fb/fb.h" +#include "math/vector.h" +#include "o3d/vertex_data.h" namespace engine::fb { -class CharacterFrameBuffer : public FrameBuffer { +using engine::math::Vector3, engine::o3d::VertexData; + +class CharacterFrameBuffer { public: CharacterFrameBuffer(unsigned int w, unsigned int h); void resize(unsigned int w, unsigned int h); - unsigned int width() const; - unsigned int height() const; - const char* chars() const; void clear(); - void draw_point(int x, int y, engine::math::Vector3 loc, const engine::o3d::VertexData& vd); + void draw_point(int x, int y, const engine::math::Vector3& loc, const engine::o3d::VertexData& vd, const engine::math::Vector3& normal); + + constexpr unsigned int width() const & { + return w; + } + + constexpr unsigned int height() const & { + return h; + } + + constexpr const char* chars() const & { + return chars_vector.data(); + } private: unsigned int w, h; std::vector<char> chars_vector; - - char face_char(int face_inf) const; }; } |