add 'graphics.dense-render' setting
This commit is contained in:
@@ -10,19 +10,29 @@
|
||||
|
||||
class Content;
|
||||
class Assets;
|
||||
class Atlas;
|
||||
struct Block;
|
||||
struct UVRegion;
|
||||
struct GraphicsSettings;
|
||||
|
||||
namespace model {
|
||||
struct Model;
|
||||
}
|
||||
|
||||
class ContentGfxCache {
|
||||
const Content* content;
|
||||
const Content& content;
|
||||
const Assets& assets;
|
||||
const GraphicsSettings& settings;
|
||||
|
||||
// array of block sides uv regions (6 per block)
|
||||
std::unique_ptr<UVRegion[]> sideregions;
|
||||
std::unordered_map<blockid_t, model::Model> models;
|
||||
public:
|
||||
ContentGfxCache(const Content* content, const Assets& assets);
|
||||
ContentGfxCache(
|
||||
const Content& content,
|
||||
const Assets& assets,
|
||||
const GraphicsSettings& settings
|
||||
);
|
||||
~ContentGfxCache();
|
||||
|
||||
inline const UVRegion& getRegion(blockid_t id, int side) const {
|
||||
@@ -32,4 +42,8 @@ public:
|
||||
const model::Model& getModel(blockid_t id) const;
|
||||
|
||||
const Content* getContent() const;
|
||||
|
||||
void refresh(const Block& block, const Atlas& atlas);
|
||||
|
||||
void refresh();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user