🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Problem with orthonormal mode

Started by
1 comment, last by pabloreda 1 year, 3 months ago

Hello, I have a problem that I can't solve and maybe I'm missing something.

I access opengl through my language (forth/r3) through the SDL2 library, so it is not a standard access and I control the construction of matrices, and see what happens with opengl through GLIntercept.

I already built many examples and they work fine, but I ran into a problem.

When I use an orthonormal array to draw text and rectangles, it only takes something like a third of the top screen and then warps the rest.

this is two screen with this behavior.

the shader..

#version 330 core
uniform vec4 fgColor;
out vec4 FragColor;
void main()
{
FragColor = fgColor;
}
-------------------------------
#version 330 core
layout (location = 0) in vec2 aPos;
uniform mat4 projection;
void main()
{
gl_Position = projection * vec4(aPos.x, aPos.y, 0.0, 1.0);
}

“projection” is the matrix for orthonormal for a screen 800x600 (I see is correct in glintercept)

Any advice? thank's

Advertisement

Forget it, the mistake was somewhere else

This topic is closed to new replies.

Advertisement