mirror of
https://github.com/lubosz/overte.git
synced 2025-04-24 00:13:53 +02:00
Fixing bug in text renderer causing glyphs to float at different depths
This commit is contained in:
parent
6378009992
commit
b28920f4ed
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