| 1 | #pragma once |
|---|---|
| 2 | |
| 3 | #include <basis/seadTypes.h> |
| 4 | |
| 5 | #include "Library/HostIO/HioNode.h" |
| 6 | |
| 7 | namespace agl { |
| 8 | class DrawContext; |
| 9 | } |
| 10 | |
| 11 | namespace al { |
| 12 | class GraphicsSystemInfo; |
| 13 | class ModelDrawBufferCounter; |
| 14 | class ModelKeeper; |
| 15 | class ModelDrawDisplayList; |
| 16 | class ModelCtrl; |
| 17 | class MeshDrawerTable; |
| 18 | |
| 19 | class ModelDrawerBase : public HioNode { |
| 20 | public: |
| 21 | ModelDrawerBase(const char* name); |
| 22 | virtual ~ModelDrawerBase(); |
| 23 | virtual void createTable() = 0; |
| 24 | virtual void draw() const = 0; |
| 25 | virtual void registerModel(ModelCtrl* model); |
| 26 | virtual void addModel(ModelCtrl* model); |
| 27 | virtual void removeModel(ModelCtrl* model); |
| 28 | virtual void updateModel(ModelCtrl* model); |
| 29 | |
| 30 | void setDrawInfo(agl::DrawContext* drawCtx, const GraphicsSystemInfo* gfxInfo, |
| 31 | const ModelDrawBufferCounter* bufferCounter, const ModelKeeper* modelKeeper); |
| 32 | void addModelToTable(ModelCtrl* model); |
| 33 | void getDrawBufferIndex(); |
| 34 | void createModelDrawDisplayList(s32); |
| 35 | bool isDraw() const; |
| 36 | |
| 37 | private: |
| 38 | const char* mName; |
| 39 | agl::DrawContext* mDrawCtx; |
| 40 | const ModelKeeper* mModelKeeper; |
| 41 | const GraphicsSystemInfo* mGraphicsSystemInfo; |
| 42 | const ModelDrawBufferCounter* mModelDrawBufferCounter; |
| 43 | ModelDrawDisplayList* mDrawDisplayList; |
| 44 | s32 mModelMaxNum; |
| 45 | s32 mModelNum; |
| 46 | ModelCtrl** mModels; |
| 47 | MeshDrawerTable* mMeshDrawerTable; |
| 48 | }; |
| 49 | |
| 50 | static_assert(sizeof(ModelDrawerBase) == 0x50); |
| 51 | |
| 52 | } // namespace al |
| 53 |