mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-10 13:31:49 +00:00
inventory render optimized
This commit is contained in:
parent
714a49685f
commit
db2108171c
12 changed files with 285 additions and 255 deletions
|
|
@ -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_
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue