使用OpenGL进行2D [英] Using OpenGL for 2D

查看:176
本文介绍了使用OpenGL进行2D的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经开始使用OpenGL并了解了模型,视图和投影矩阵。从我的理解,投影矩阵只需要投影到2D表面(屏幕)上的3D实体。所以如果我想创建一个2D游戏,我甚至需要弄乱投影矩阵?

I have started with OpenGL and learned about model,view,and the projection matrix. From my understanding the projection matrix is only needed to project a 3D entity onto a 2D surface(the screen). So if I want to create a 2D game would I even need to mess around with the projection matrix?

推荐答案

不。当纯粹处理两个维度时,您可以将投影矩阵保留为单位矩阵。

No. When dealing purely with two dimensions, you can leave the projection matrix as the identity matrix.

这篇关于使用OpenGL进行2D的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆