Use non-instanced triangle lists to draw text overlay

* Mesa GL seems like it doesn't like the instanced draw, for whatever
  reason.
This commit is contained in:
baldurk committed 2017-01-17 11:02:40 +00:00
1 parent ae0f6ea3a0
commit eb5761dabe
3 files changed
+12 -5

No files matched your search

+8 -3
View File
@@ -33,13 +33,18 @@ layout (location = 1) out vec2 glyphuv;
void main(void)
{
const vec3 verts[4] = vec3[4](vec3( 0.0, 0.0, 0.5),
const vec3 verts[6] = vec3[6](vec3( 0.0, 0.0, 0.5),
vec3( 1.0, 0.0, 0.5),
vec3( 0.0, 1.0, 0.5),
vec3( 1.0, 0.0, 0.5),
vec3( 0.0, 1.0, 0.5),
vec3( 1.0, 1.0, 0.5));
vec3 pos = verts[VERTEX_ID];
uint strindex = uint(INSTANCE_ID);
uint vert = uint(VERTEX_ID)%6u;
vec3 pos = verts[vert];
uint strindex = uint(VERTEX_ID)/6u;
vec2 charPos = vec2(strindex + pos.x + general.TextPosition.x, pos.y + general.TextPosition.y);