Added UIElement and Text; Custom fonts are supported

This commit is contained in:
grayson committed 2021-09-01 19:17:24 -05:00
1 parent c0f7634b5f
commit 65fd8e89bb
30 files changed
+346 -35

No files matched your search

Binary file not shown.
@@ -0,0 +1,13 @@
#version 330 core
out vec4 color;
uniform sampler2D text;
uniform vec3 textColor;
in vec2 texCoord;
void main() {
vec4 temp = vec4(1.0, 1.0, 1.0, texture(text, texCoord).r);
color = vec4(textColor.xyz, 1.0) * temp;
}
@@ -0,0 +1,14 @@
#version 330 core
layout(location = 0) in vec2 pos;
layout(location = 1) in vec2 texCoords;
//uniform mat4 model;
uniform mat4 proj;
out vec2 texCoord;
void main() {
gl_Position = proj * vec4(pos, 0.0, 1.0);
texCoord = texCoords;
}