OpenGL coordinates + VAO / VBO / EBO

Hello, triangle

One: the issue of coordinates

  1. Normalized device coordinates: vertex data input device should be normalized i.e. in which the coordinate range: x value, y, z are between -1 --- 1 The coordinates are outside this range are discarded.

    1.1 Once the incoming vertex data in the vertex shader, then they must all be the normalized device coordinates.
    1.2 normalized device coordinates in line with right-hand rule that the origin of the center of the screen.
  2. Screen space coordinates: normalized device coordinates would then transformed into screen space coordinates (Screen-space Coordinates), which is used glViewport function performs viewport transformation (Viewport Transform) completed.

    2.1 is the center of the screen space coordinates in the upper left corner.
  3. Screen space coordinates will be converted into a fragment incoming fragment shader.

II: About VAO

Guess you like

Origin www.cnblogs.com/GarrettWale/p/11335044.html