Added UIElement and Text; Custom fonts are supported
This commit is contained in:
1 parent
c0f7634b5f
commit
65fd8e89bb
30 files changed
+346
-35
No files matched your search
Binary file not shown.
File renamed without changes.
File renamed without changes.
@@ -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;
|
||||
}
|
||||
@@ -75,7 +75,7 @@ int main(int argc, char* argv[]) {
|
||||
}
|
||||
|
||||
std::set<std::string> extensions;
|
||||
extensions.insert({ "obj", "png", "shader" });
|
||||
extensions.insert({ "obj", "png", "shader", "ttf" });
|
||||
|
||||
unsigned int dirCount = 0;
|
||||
const std::filesystem::path workingDir = std::filesystem::current_path();
|
||||
|
||||
Reference in new issue
Block a user