Fix shaders

This commit is contained in:
junseopark-digipen
2026-09-14 18:12:56 +09:00
parent 7f237ea2ba
commit fab2ad91a8
3 changed files with 6 additions and 6 deletions

View File

@@ -88,7 +88,6 @@ shader_result Shader::init()
const GLchar* const vertex_source_array[] = { const GLchar* const vertex_source_array[] = {
vertex_source.c_str() vertex_source.c_str()
}; };
std::cout << vertex_source;
// Set vertex source // Set vertex source
glShaderSource(vertex_shader_id, 1, vertex_source_array, NULL); glShaderSource(vertex_shader_id, 1, vertex_source_array, NULL);
@@ -114,7 +113,6 @@ shader_result Shader::init()
const GLchar* const fragment_source_array[] = { const GLchar* const fragment_source_array[] = {
fragment_source.c_str() fragment_source.c_str()
}; };
std::cout << fragment_source;
// Set fragment source // Set fragment source
glShaderSource(fragment_shader_id, 1, fragment_source_array, NULL); glShaderSource(fragment_shader_id, 1, fragment_source_array, NULL);

View File

@@ -1,8 +1,10 @@
#version 300 es #version 300 es
precision mediump float;
out vec4 fragment_color; out vec4 fragment_color;
void main() void main()
{ {
fragment_color = vec4(1.0, 0.5, 0.5, 1.0); fragment_color = vec4( 1.0, 0.5, 0.5, 1.0 );
} }

View File

@@ -6,5 +6,5 @@ layout (location = 0) in vec2 vertex_pos_2d;
void main() void main()
{ {
gl_Position = vec4(vertex_pos_2d.x, vertex_pos_2d.y, 0.0, 1.0); gl_Position = vec4(vertex_pos_2d.x, vertex_pos_2d.y, 0.0, 1.0);
} // foo bar }