- Added Texture and glTexture class ( no dx implementation yet ) - Added TextureRendererProgram to Renderer - Added LoadTexture to ResourceManager - Added TextureShader - Added awesomeface.png - Removed unused shader files from Sandbox/res - Fixed gladLoadGLLoader call in glGraphicsContext - Enabled alpha blending in glGraphicsContext - Added stb_image library
35 lines
No EOL
496 B
C
35 lines
No EOL
496 B
C
#define LT_ENGINE_RESOURCES_TEXTURE_SHADER_VS \
|
|
R"(
|
|
+GLSL
|
|
#version 440 core
|
|
|
|
layout(location = 0) in vec3 a_Position;
|
|
layout(location = 1) in vec2 a_TexCoords;
|
|
|
|
out vec2 texCoords;
|
|
|
|
void main()
|
|
{
|
|
gl_Position = vec4(a_Position, 1.0);
|
|
texCoords = a_TexCoords;
|
|
}
|
|
-GLSL
|
|
)"
|
|
|
|
#define LT_ENGINE_RESOURCES_TEXTURE_SHADER_PS \
|
|
R"(
|
|
+GLSL
|
|
#version 440 core
|
|
|
|
in vec2 texCoords;
|
|
|
|
uniform sampler2D u_Texture;
|
|
|
|
out vec4 FragmentColor;
|
|
|
|
void main()
|
|
{
|
|
FragmentColor = texture(u_Texture, texCoords);
|
|
}
|
|
-GLSL
|
|
)" |