Fixed shader alignment on windows

This commit is contained in:
2023-06-19 11:44:45 -07:00
parent 0917851287
commit 2285914c2e
5 changed files with 24 additions and 11 deletions

View File

@ -98,7 +98,7 @@ float_t UILabel::getContentHeight() {
}
void UILabel::rebufferQuads(const std::vector<struct UILabelText> newTexts) {
assertTrue(newTexts.size() < FONT_SHADER_PARTS_MAX);
assertTrue(newTexts.size() <= FONT_SHADER_PARTS_MAX);
int32_t nextTexture = 0;
glm::vec2 position(0, 0);
@ -149,7 +149,7 @@ void UILabel::rebufferQuads(const std::vector<struct UILabelText> newTexts) {
}
// Buffer shader values
fontData.textures[partIndex] = textureMap[realText.texture];
fontData.textures[partIndex].value = textureMap[realText.texture];
fontData.colors[partIndex] = realText.style.color;
// Get some texture info
@ -174,7 +174,7 @@ void UILabel::rebufferQuads(const std::vector<struct UILabelText> newTexts) {
glm::vec4 uvs(0, 0, 1, 1);
glm::vec4 vert(0, 0, 0, 0);
vertices.push_back(std::make_pair(vert, uvs));
fontData.fontQuadMappings[quadCountTotal] = partIndex;
fontData.quadMappings[quadCountTotal].value = partIndex;
quadCountTotal++;
}
@ -281,7 +281,7 @@ void UILabel::rebufferQuads(const std::vector<struct UILabelText> newTexts) {
}
// Set the part index to the quad mappings
fontData.fontQuadMappings[quadCountTotal] = partIndex;
fontData.quadMappings[quadCountTotal].value = partIndex;
quadCountTotal++;
realText.text += ch;
}