summaryrefslogtreecommitdiffstats
path: root/src/Rml.cpp
diff options
context:
space:
mode:
authorLaG1924 <lag1924@gmail.com>2021-06-13 18:20:25 +0200
committerLaG1924 <lag1924@gmail.com>2021-06-13 18:20:25 +0200
commitcc937302964a04aa8e7cdc0e6796503559efaa69 (patch)
tree3a6b890d32ed735d42f042a08c1af9637cb62b70 /src/Rml.cpp
parentFixed Linux build of RmlUi (diff)
downloadAltCraft-cc937302964a04aa8e7cdc0e6796503559efaa69.tar
AltCraft-cc937302964a04aa8e7cdc0e6796503559efaa69.tar.gz
AltCraft-cc937302964a04aa8e7cdc0e6796503559efaa69.tar.bz2
AltCraft-cc937302964a04aa8e7cdc0e6796503559efaa69.tar.lz
AltCraft-cc937302964a04aa8e7cdc0e6796503559efaa69.tar.xz
AltCraft-cc937302964a04aa8e7cdc0e6796503559efaa69.tar.zst
AltCraft-cc937302964a04aa8e7cdc0e6796503559efaa69.zip
Diffstat (limited to 'src/Rml.cpp')
-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);