Hello, I'm trying to modify the standard vertex and fragment shader to be used with version 330.
Is it possible to do this without directly using opengl?
This is the vertex shader I'd like to use:
#version 330 core
layout(location = 0) in vec2 in_position;
layout(location = 1) in vec3 in_color;
layout(location = 2) in vec2 in_tex_coord;
out vec4 v2f_color;
out vec2 v2f_tex_coord;
uniform mat4 mvp;
void main()
{
gl_Position = mvp * vec4(in_position.x, in_position.y, 0, 1);
v2f_color = vec4(in_color, 1);
v2f_tex_coord = in_tex_coord;
}
I draw to the render window using the VertexArray class.
Is it possible to get the model view projection matrix and send it to the shader?
Also, how would I go about sending "in" values to the vertex shader using sfml?
Or do I just have to go back to version 120 in order to not be bothered directly with opengl?