Skip to content

Instantly share code, notes, and snippets.

@ucectoplasm
Created March 31, 2020 06:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ucectoplasm/311b4337f6609910b49e6ecd7d5abda2 to your computer and use it in GitHub Desktop.
Save ucectoplasm/311b4337f6609910b49e6ecd7d5abda2 to your computer and use it in GitHub Desktop.
diff -r gltext.h.old gltext.h.new
484a485,494
> GLfloat mv[16];
> _gltMat4Mult(view, model, mv);
>
> mv[0] = -scale;
> mv[1] = 0.0;
> mv[2] = 0.0;
> mv[4] = 0.0;
> mv[5] = -scale;
> mv[6] = 0.0;
>
486,490c496,498
< GLfloat vp[16];
<
< _gltMat4Mult(projection, view, vp);
< _gltMat4Mult(vp, model, mvp);
<
---
> _gltMat4Mult(projection, mv, mvp);
>
> glUniform1f(glGetUniformLocation(_gltText2DShader, "width"), gltGetTextWidth(text, scale));
838a847
> "uniform float width;\n"
846a856
> " gl_Position.x -= width / 2.0f;\n"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment