persona-3-dual
A DS demake of Persona 3
Loading...
Searching...
No Matches
RenderManager.hpp
Go to the documentation of this file.
1
6
7#pragma once
10#include "types/ModelTypes.hpp"
11#include "types/RenderTypes.hpp"
12#include <aegis/manager.hpp>
13
14class RenderManager : public ae::Manager, public ae::Singleton<RenderManager>
15{
16 public:
17 void init() override
18 {
19 }
20
21 void process() override
22 {
23 }
24
25 void shutdown() override
26 {
27 }
28
41 void initialize3DView(View3DConfig config);
42
46 void cleanup3DView();
47
61 bool uploadTexture(int& textureID,
62 const GL_TEXTURE_TYPE_ENUM texType,
63 const int sizeX,
64 const int sizeY,
65 int param,
66 const void* bitmap);
67
77
91 ae::q20_12_t posX,
92 ae::q20_12_t posY,
93 ae::q20_12_t posZ,
94 uint32_t rotX,
95 uint32_t rotY,
96 uint32_t rotZ,
97 ae::q20_12_t scale = ae::q20_12_t{1});
98
110 BillboardData bb, const int texture, bool faceCamera, ae::q20_12_t camX, ae::q20_12_t camY, ae::q20_12_t camZ);
111
112 // TODO: make this function inline
122 void renderDisplayList(const void* displayList, const int texture);
123
128 void deleteTexture(int& texture);
129
130 private:
131 friend class Singleton<RenderManager>;
132 RenderManager() = default;
133
134 static inline const ae::q20_12_t DEGREE_MODIFIER = ae::q20_12_t{1 << 15} / ae::q20_12_t{360};
136
137 MathManager& math = MathManager::getInstance();
138};
void cleanup3DView()
Cleans up the 3D view, resetting the state.
void renderTexturedBillboard(BillboardData bb, const int texture, bool faceCamera, ae::q20_12_t camX, ae::q20_12_t camY, ae::q20_12_t camZ)
Renders a textured billboard.
void process() override
bool uploadTexture(int &textureID, const GL_TEXTURE_TYPE_ENUM texType, const int sizeX, const int sizeY, int param, const void *bitmap)
Uploads a texture to the GPU.
void init() override
RenderManager()=default
void initialize3DView(View3DConfig config)
Initialize a new 3D view.
void renderDisplayList(const void *displayList, const int texture)
Renders a textured model.
void renderModelComponent(MDL3Model &model)
Renders a MDL3 model.
void deleteTexture(int &texture)
Deletes a texture from the GPU and resets its ID.
static const ae::q20_12_t DEGREE_MODIFIER
MathManager & math
void shutdown() override
Represents a 3D model with nodes, textures, and animations.
Data structure to store 3D view configuration parameters.