added 2d png support

This commit is contained in:
h4570
2020-12-01 17:26:10 +01:00
parent 3841487388
commit 510199164c
17 changed files with 317 additions and 80 deletions
+5 -4
View File
@@ -17,6 +17,7 @@
#include "gif_sender.hpp"
#include "vif_sender.hpp"
#include "../models/math/plane.hpp"
#include "../models/sprite.hpp"
#include "../models/screen_settings.hpp"
#include "../models/render_data.hpp"
#include "./texture_repository.hpp"
@@ -39,6 +40,8 @@ public:
/// --- Draw: PATH3
void draw(Sprite &t_sprite);
/**
* Draw many meshes with lighting information.
* Slowest way of rendering (PATH 3, using EE and GIF).
@@ -103,14 +106,12 @@ public:
TextureRepository *getTextureRepository() { return &textureRepo; };
void drawRectangle();
private:
void changeTexture(const Mesh &t_mesh, u32 t_materialId);
void changeTexture(MeshTexture *t_tex);
u32 lastTextureId;
texbuffer_t textureBuffer;
u8 isTextureVRAMAllocated, isVSyncEnabled;
void allocateTextureBuffer(u16 t_width, u16 t_height);
void allocateTextureBuffer(MeshTexture *t_texture);
void deallocateTextureBuffer();
void flipBuffers();
void beginFrameIfNeeded();