mirror of
https://github.com/overte-org/overte.git
synced 2025-04-08 09:33:49 +02:00
Don't try to set invalid uniforms
This commit is contained in:
parent
d10d7026c5
commit
17e9c3d00c
1 changed files with 6 additions and 2 deletions
|
@ -369,11 +369,15 @@ void Font::drawString(gpu::Batch& batch, float x, float y, const QString& str, c
|
|||
|
||||
batch.setPipeline(((*color).a < 1.0f || layered) ? _transparentPipeline : _pipeline);
|
||||
batch.setResourceTexture(_fontLoc, _texture);
|
||||
batch._glUniform1i(_outlineLoc, (effectType == OUTLINE_EFFECT));
|
||||
if (_outlineLoc >= 0) {
|
||||
batch._glUniform1i(_outlineLoc, (effectType == OUTLINE_EFFECT));
|
||||
}
|
||||
|
||||
// need the gamma corrected color here
|
||||
glm::vec4 lrgba = ColorUtils::sRGBToLinearVec4(*color);
|
||||
batch._glUniform4fv(_colorLoc, 1, (const float*)&lrgba);
|
||||
if (_colorLoc >= 0) {
|
||||
batch._glUniform4fv(_colorLoc, 1, (const float*)&lrgba);
|
||||
}
|
||||
|
||||
batch.setInputFormat(_format);
|
||||
batch.setInputBuffer(0, _verticesBuffer, 0, _format->getChannels().at(0)._stride);
|
||||
|
|
Loading…
Reference in a new issue