OpenGL define vertex position in pixels

后端 未结 5 1325
迷失自我
迷失自我 2020-11-27 04:16

I\'ve been writing a 2D basic game engine in OpenGL/C++ and learning everything as I go along. I\'m still rather confused about defining vertices and their \"position\". Tha

5条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-27 04:43

    It is called transformation.

    Vertices are set in 3D coordinates which is transformed into a viewport coordinates (into your window view). This transformation can be set in various ways. Orthogonal transformation can be easiest to understand as a starter.

    http://www.songho.ca/opengl/gl_transform.html

    http://www.opengl.org/wiki/Vertex_Transformation

    http://www.falloutsoftware.com/tutorials/gl/gl5.htm

提交回复
热议问题