moving textures to textures repo #1

This commit is contained in:
Sandro Sobczyński
2020-10-31 10:53:20 +01:00
parent ebf2a9ac24
commit 3cfe7ba8f1
11 changed files with 127 additions and 76 deletions
+9 -4
View File
@@ -19,6 +19,7 @@
#include "../models/math/plane.hpp"
#include "../models/screen_settings.hpp"
#include "../models/render_data.hpp"
#include "./texture_repository.hpp"
/** Class responsible for intializing draw env, textures and buffers */
class Renderer
@@ -55,17 +56,21 @@ public:
void endFrame(float fps);
TextureRepository *getTextureRepository() { return &textureRepo; };
private:
void changeTexture(Mesh *t_mesh, u8 t_textureIndex);
u32 lastTextureId;
texbuffer_t textureBuffer;
u8 isTextureVRAMAllocated;
void allocateTextureBuffer(u16 t_width, u16 t_height);
void deallocateTextureBuffer();
void changeTexture(Mesh *t_mesh, u8 t_textureIndex);
void flipBuffers();
void beginFrameIfNeeded();
u8 isFrameEmpty, isTextureVRAMAllocated;
u8 isFrameEmpty;
Matrix perspective;
RenderData renderData;
texbuffer_t textureBuffer;
u32 lastTextureId;
TextureRepository textureRepo;
GifSender *gifSender;
VifSender *vifSender;
packet_t *flipPacket;
@@ -24,10 +24,6 @@ public:
~TextureRepository();
private:
void allocateTextureBuffer(u16 t_width, u16 t_height);
void deallocateTextureBuffer();
void changeTexture(Mesh *t_mesh, u8 t_textureIndex);
texbuffer_t textureBuffer;
};
#endif