minor refactor

This commit is contained in:
MihailRis 2024-01-21 23:48:56 +03:00
parent db2108171c
commit d2fe51e1ff
3 changed files with 11 additions and 13 deletions

View File

@ -35,7 +35,8 @@ ImageData* BlocksPreview::draw(
// something went wrong...
break;
case BlockModel::block:
batch->blockCube(glm::vec3(size * 0.63f), texfaces, glm::vec4(1.0f), !def->rt.emissive);
batch->blockCube(glm::vec3(size * 0.63f), texfaces,
glm::vec4(1.0f), !def->rt.emissive);
break;
case BlockModel::aabb:
batch->blockCube(def->hitbox.size() * glm::vec3(size * 0.63f),

View File

@ -153,9 +153,6 @@ void SlotView::draw(Batch2D* batch, Assets* assets) {
batch->color = glm::vec4(1.0f);
Viewport viewport(Window::width, Window::height);
GfxContext ctx(nullptr, viewport, batch);
auto previews = frontend->getBlocksAtlas();
auto indices = content->getIndices();

View File

@ -8,19 +8,19 @@ class ImageData;
class Texture {
public:
uint id;
int width;
int height;
Texture(uint id, int width, int height);
Texture(ubyte* data, int width, int height, uint format);
~Texture();
uint id;
int width;
int height;
Texture(uint id, int width, int height);
Texture(ubyte* data, int width, int height, uint format);
~Texture();
void bind();
void reload(ubyte* data);
void bind();
void reload(ubyte* data);
ImageData* readData();
static Texture* from(const ImageData* image);
static Texture* from(const ImageData* image);
};
#endif /* GRAPHICS_TEXTURE_H_ */