mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-12 14:31:50 +00:00
refactor textures access
This commit is contained in:
parent
673f235ff9
commit
4f377b2056
13 changed files with 74 additions and 49 deletions
21
src/assets/assets_util.hpp
Normal file
21
src/assets/assets_util.hpp
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "maths/UVRegion.hpp"
|
||||
|
||||
class Assets;
|
||||
class Texture;
|
||||
|
||||
namespace util {
|
||||
struct TextureRegion {
|
||||
const Texture* texture;
|
||||
UVRegion region;
|
||||
};
|
||||
|
||||
TextureRegion getTextureRegion(
|
||||
const Assets& assets,
|
||||
const std::string& name,
|
||||
const std::string& fallback
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue