#ifndef FB_PIXFB_H #define FB_PIXFB_H #include #include #include "math/vector.h" #include "o3d/vertex_data.h" namespace engine::fb { using engine::math::Vector3, engine::o3d::VertexData; class PixelFrameBuffer { public: PixelFrameBuffer(unsigned int w, unsigned int h); void resize(unsigned int w, unsigned int h); void clear(); void draw_point(int x, int y, const Vector3& loc, const VertexData& vd, const Vector3& normal); constexpr unsigned int width() const & { return w; } constexpr unsigned int height() const & { return h; } constexpr const uint32_t* pixels() const & { return pixels_vector.data(); } private: unsigned int w, h; std::vector pixels_vector; int face_ind; }; } #endif // FB_PIXFB_H