mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-08 04:21:50 +00:00
add 'modelviewer' ui element
This commit is contained in:
parent
761afe51a5
commit
7a25560bc0
7 changed files with 261 additions and 11 deletions
|
|
@ -3,6 +3,7 @@
|
|||
#include "typedefs.hpp"
|
||||
#include "commons.hpp"
|
||||
#include "MeshData.hpp"
|
||||
#include "maths/UVRegion.hpp"
|
||||
|
||||
#include <memory>
|
||||
#include <cstdlib>
|
||||
|
|
@ -32,8 +33,8 @@ class Batch3D : public Flushable {
|
|||
std::unique_ptr<Texture> blank;
|
||||
size_t index;
|
||||
glm::vec4 tint {1.0f};
|
||||
|
||||
const Texture* currentTexture;
|
||||
UVRegion region {0.0f, 0.0f, 1.0f, 1.0f};
|
||||
|
||||
void vertex(
|
||||
float x, float y, float z,
|
||||
|
|
@ -102,6 +103,8 @@ public:
|
|||
const glm::vec4& tint,
|
||||
bool shading = true
|
||||
);
|
||||
void setRegion(UVRegion region);
|
||||
void vertex(const glm::vec3& pos, const glm::vec2& uv, const glm::vec3& norm);
|
||||
void vertex(const glm::vec3& pos, const glm::vec2& uv, const glm::vec4& tint);
|
||||
void point(const glm::vec3& pos, const glm::vec4& tint);
|
||||
void flush() override;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue