diff options
author | LaG1924 <lag1924@gmail.com> | 2021-11-27 17:08:58 +0100 |
---|---|---|
committer | LaG1924 <lag1924@gmail.com> | 2021-11-27 17:08:58 +0100 |
commit | c905ede556c892d39fd69d3945026ba244567ce9 (patch) | |
tree | 86b0d1f5f3ba47358bfb3a89c1dba9ae9a344a39 /src/Rml.cpp | |
parent | Added ShaderParametersBuffer to GalOgl (diff) | |
download | AltCraft-c905ede556c892d39fd69d3945026ba244567ce9.tar AltCraft-c905ede556c892d39fd69d3945026ba244567ce9.tar.gz AltCraft-c905ede556c892d39fd69d3945026ba244567ce9.tar.bz2 AltCraft-c905ede556c892d39fd69d3945026ba244567ce9.tar.lz AltCraft-c905ede556c892d39fd69d3945026ba244567ce9.tar.xz AltCraft-c905ede556c892d39fd69d3945026ba244567ce9.tar.zst AltCraft-c905ede556c892d39fd69d3945026ba244567ce9.zip |
Diffstat (limited to 'src/Rml.cpp')
-rw-r--r-- | src/Rml.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/Rml.cpp b/src/Rml.cpp index fa2d4e7..746f6a4 100644 --- a/src/Rml.cpp +++ b/src/Rml.cpp @@ -64,7 +64,6 @@ RmlRenderInterface::RmlRenderInterface() { { auto pipelineConfig = gal->CreatePipelineConfig(); - pipelineConfig->AddShaderParameter("viewportSize", Gal::Type::Vec2u32); pipelineConfig->AddShaderParameter("translation", Gal::Type::Vec2); pipelineConfig->SetTarget(gal->GetDefaultFramebuffer()); pipelineConfig->SetVertexShader(gal->LoadVertexShader(vertexSource)); @@ -72,7 +71,7 @@ RmlRenderInterface::RmlRenderInterface() { auto vertBuffBind = pipelineConfig->BindVertexBuffer({ {"pos", Gal::Type::Vec2}, - {"color", Gal::Type::Vec4u8}, + {"col", Gal::Type::Vec4u8}, {"", Gal::Type::Vec2}, //it's not used in shader, so driver optimizes it away }); @@ -88,7 +87,6 @@ RmlRenderInterface::RmlRenderInterface() { { auto texPipelineConfig = gal->CreatePipelineConfig(); - texPipelineConfig->AddShaderParameter("viewportSize", Gal::Type::Vec2u32); texPipelineConfig->AddShaderParameter("translation", Gal::Type::Vec2); texPipelineConfig->AddShaderParameter("fontTexture", Gal::Type::Int32); texPipelineConfig->SetTarget(gal->GetDefaultFramebuffer()); @@ -97,8 +95,8 @@ RmlRenderInterface::RmlRenderInterface() { auto texVertBuffBind = texPipelineConfig->BindVertexBuffer({ {"pos", Gal::Type::Vec2}, - {"color", Gal::Type::Vec4u8}, - {"tex_coord", Gal::Type::Vec2}, + {"col", Gal::Type::Vec4u8}, + {"uvPos", Gal::Type::Vec2}, }); auto texIndexBuffBind = texPipelineConfig->BindIndexBuffer(); @@ -165,9 +163,6 @@ void RmlRenderInterface::ReleaseTexture(Rml::TextureHandle texture) { } void RmlRenderInterface::Update(unsigned int windowWidth, unsigned int windowHeight) { - pipeline->SetShaderParameter("viewportSize", glm::uvec2(windowWidth, windowHeight)); - texPipeline->SetShaderParameter("viewportSize", glm::uvec2(windowWidth, windowHeight)); - vpWidth = windowWidth; vpHeight = windowHeight; } |