add 'modelviewer' ui element
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user