OpenGL ES作为2D平台 [英] OpenGL ES as a 2D Platform

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

问题描述

我看过很多关于什么更好的Quartz或者2D游戏的OpenGL ES。不要忘记像Cocos2D这样的库,我很好奇,如果任何人都可以指出使用OpenGL ES作为2D平台的资源。我的意思是,我们是否真的认为学习3D编程值得稍微提高速度......或者可以从2D角度来学习它?

解决方案

GL可能会给你带来更好的性能,CPU使用率更低,电池耗尽等等。使用GL进行2D绘图就像使用GL进行3D绘制一样,只需不改变Z坐标即可。



这就是说,使用Quartz编写2D绘图代码更容易,所以你必须决定权衡。


I've seen a lot of bandying about what's better, Quartz or OpenGL ES for 2D gaming. Neverminding libraries like Cocos2D, I'm curious if anyone can point to resources that teach using OpenGL ES as a 2D platform. I mean, are we really stating that learning 3D programming is worth a slight speed increase...or can it be learned from a 2D perspective?

解决方案

GL is likely to give you better performance, with less CPU usage, battery drain, and so on. 2D drawing with GL is just like 3D drawing with GL, you just don't change the Z coordinate.

That being said, it's easier to write 2D drawing code with Quartz, so you have to decide the trade-off.

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

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