Confused about OpenGL's Coordinate system and 3D scene, and how they are perceived

Modern OpenGL
  • buttersstotch
    Likes 0

    Problem Description

    My question is actually related two part questions. I am following the tutorial on Youtube Sonar Systems,and I use exactly the same code My colored triangle shows up with no problem.

    But if I change the width and the height (globally declared ones) the window size changes but the triangles also becomes narrower or wider with it. Why would this happen? Shouldn’t the triangle size and locaiton stay the same and just the window would become larger etc.?

    And also when I change just the z coordinates of all vertexes to another value like -3 the triangle disappears. Shoudn^t it just appear further? I feel like these two issues are related to the coordinate system we are working in or perhaps the viewing volume. Am I not understanding the coordinate system, viewing volume, the 3D scene correctly?

    I would appreciate any kind of answer/help or push in the right direction. Thank you

  • Sonar Systems admin
    Likes 0

    How far are you into the series?


    This reply has been verified.
  • buttersstotch
    Likes 0

    I was at the shader video at that time I found out that the first problem I desribed might be related to the viewport, which I have yet to learn about. But now instead of that I am following your OpenGL FPS tutorial it’s turning out to be much more helpful for my case. Thank you for the reply

  • Sonar Systems admin
    Likes 0

    Good to hear.

Login to reply