summaryrefslogtreecommitdiffstats
path: root/src/Rml.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Rml.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Rml.cpp b/src/Rml.cpp
index 7987121..bcdca0c 100644
--- a/src/Rml.cpp
+++ b/src/Rml.cpp
@@ -84,10 +84,12 @@ RmlRenderInterface::~RmlRenderInterface() {
void RmlRenderInterface::RenderGeometry(Rml::Vertex* vertices, int num_vertices, int* indices, int num_indices, Rml::TextureHandle texture, const Rml::Vector2f& translation) {
if (texture) {
AssetManager::GetAsset<AssetShader>("/altcraft/shaders/rmltex")->shader->Activate();
+ AssetManager::GetAsset<AssetShader>("/altcraft/shaders/rmltex")->shader->SetUniform("translation", glm::vec2(translation.x, translation.y));
glBindTexture(GL_TEXTURE_2D, texture);
- }
- else
+ } else {
AssetManager::GetAsset<AssetShader>("/altcraft/shaders/rml")->shader->Activate();
+ AssetManager::GetAsset<AssetShader>("/altcraft/shaders/rml")->shader->SetUniform("translation", glm::vec2(translation.x, translation.y));
+ }
glCheckError();
glBindVertexArray(Vao);