add freetype-based text rendering and box labels
This commit is contained in:
1 parent
96d879076a
commit
f41228acf8
9 files changed
+406
-9
No files matched your search
Binary file not shown.
@@ -0,0 +1,11 @@
|
||||
#version 330 core
|
||||
in vec2 TexCoord;
|
||||
out vec4 FragColor;
|
||||
|
||||
uniform sampler2D uText;
|
||||
uniform vec3 uColor;
|
||||
|
||||
void main() {
|
||||
float a = texture(uText, TexCoord).r; // glyph alpha in RED channel
|
||||
FragColor = vec4(uColor, a);
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
#version 330 core
|
||||
in vec2 vPosition;
|
||||
in vec2 vTexCoord;
|
||||
|
||||
out vec2 TexCoord;
|
||||
|
||||
uniform mat4 uProjection;
|
||||
|
||||
void main() {
|
||||
TexCoord = vTexCoord;
|
||||
gl_Position = uProjection * vec4(vPosition.xy, 0.0, 1.0);
|
||||
}
|
||||
Reference in new issue
Block a user