mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 18:23:54 +02:00
Merge pull request #4251 from jherico/master
Fixing bug in text renderer causing glyphs to float at different depths
This commit is contained in:
commit
967b04af1a
2 changed files with 3 additions and 3 deletions
|
@ -345,7 +345,7 @@ void Font::setupGL() {
|
|||
int posLoc = _program->attributeLocation("Position");
|
||||
int texLoc = _program->attributeLocation("TexCoord");
|
||||
glEnableVertexAttribArray(posLoc);
|
||||
glVertexAttribPointer(posLoc, 3, GL_FLOAT, false, stride, nullptr);
|
||||
glVertexAttribPointer(posLoc, 2, GL_FLOAT, false, stride, nullptr);
|
||||
glEnableVertexAttribArray(texLoc);
|
||||
glVertexAttribPointer(texLoc, 2, GL_FLOAT, false, stride, offset);
|
||||
_vao->release();
|
||||
|
|
|
@ -13,12 +13,12 @@
|
|||
uniform mat4 Projection;
|
||||
uniform mat4 ModelView;
|
||||
|
||||
attribute vec3 Position;
|
||||
attribute vec2 Position;
|
||||
attribute vec2 TexCoord;
|
||||
|
||||
varying vec2 vTexCoord;
|
||||
|
||||
void main() {
|
||||
vTexCoord = TexCoord;
|
||||
gl_Position = Projection * ModelView * vec4(Position, 1.0);
|
||||
gl_Position = Projection * ModelView * vec4(Position, 0.0, 1.0);
|
||||
}
|
Loading…
Reference in a new issue