diff options
author | vimene <vincent.menegaux@gmail.com> | 2023-11-22 20:32:48 +0100 |
---|---|---|
committer | vimene <vincent.menegaux@gmail.com> | 2023-11-22 20:32:48 +0100 |
commit | 4558a2a704bf75266f7262f8dd41bb1c9b094e1d (patch) | |
tree | 3042dedc701d0458d5ede0a85d554ec174c61a6f /src/pixfb.h | |
parent | 6322e8d7e6e4ddb1c0a0b3a00a1b516d1a84df49 (diff) | |
download | engine-4558a2a704bf75266f7262f8dd41bb1c9b094e1d.tar.gz |
code refactoring
Diffstat (limited to 'src/pixfb.h')
-rw-r--r-- | src/pixfb.h | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/src/pixfb.h b/src/pixfb.h deleted file mode 100644 index c54b5fb..0000000 --- a/src/pixfb.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef PIXFB_H -#define PIXFB_H - -#include <vector> -#include <cstdint> -#include "math_vector.h" -#include "tri_vertex.h" - -class PixelFrameBuffer { - public: - PixelFrameBuffer(unsigned int w, unsigned int h); - void resize(unsigned int w, unsigned int h); - unsigned int width() const; - unsigned int height() const; - const uint32_t* pixels() const; - void clear(); - void draw_triangle(TriangleVertex4 triangle); - - private: - unsigned int w, h; - std::vector<uint32_t> pixels_vector; - std::vector<float> depth_buf; - int face_ind; - - void _draw_cropped_triangle(TriangleVertex3 triangle); - uint32_t face_color() const; -}; - -#endif // PIXFB_H |