inventory render optimized

This commit is contained in:
MihailRis
2024-01-21 23:35:41 +03:00
parent 714a49685f
commit db2108171c
12 changed files with 285 additions and 255 deletions
+13 -11
View File
@@ -6,25 +6,27 @@
#include <memory>
class Assets;
class Viewport;
class Shader;
class ImageData;
class Atlas;
class Framebuffer;
class Batch3D;
class Block;
class Content;
class ContentGfxCache;
class BlocksPreview {
Shader* shader;
Atlas* atlas;
std::unique_ptr<Batch3D> batch;
const ContentGfxCache* const cache;
const Viewport* viewport;
public:
BlocksPreview(Assets* assets, const ContentGfxCache* cache);
~BlocksPreview();
static ImageData* draw(
const ContentGfxCache* cache,
Framebuffer* framebuffer,
Batch3D* batch,
const Block* block,
int size);
void begin(const Viewport* viewport);
void draw(const Block* block, int x, int y, int size, glm::vec4 tint);
static std::unique_ptr<Atlas> build(
const ContentGfxCache* cache,
Assets* assets,
const Content* content);
};
#endif // FRONTEND_BLOCKS_PREVIEW_H_