Translate and scale a rectangle with OpenGL 3+
0
I want to translate and scale a rectangle to specific coordinates. At this time I have to scale the rectangle only in the y plane. The translation works well, I have problems with the scaling, the rectangle is not placed at the right position. I tried to apply another solutions I found here and in another posts in stack overflow without success. This should be very easy, but I can't find the solution. I become from my source the top, bottom, left and right coordinates. This is a part of the code. Vertex and Fragment Shader: vertexShaderSource = "#version 150 n" "in vec2 aPos;n" "in vec4 aColor;n" "uniform mat4 projection;n" "uniform mat4 model;n" "uniform bool isLine;n" "out vec4 oColor;n" "void main() {n" " gl_...