您的位置:首页 > 移动开发 > Android开发

Android using OpenGL ES for 2D development (introduction)

2013-11-01 16:43 585 查看

1.what is a OpenGL ES

OpenGL is (Open Graphics Library) abbreviation

OpenGL ES target devices including mobile phones, home appliances, and vehicles. Because  OpenGL ES must be smaller than OpenGL, so it deleted a lot of functions. For example, OpenGL ES can not be directly supported by drawing a rectangle, you must draw two triangles to form a rectangle.
Both are from the Khronos Group maintains that the association by the ATI, NVIDIA, and Intel and other companies

2.Programming model



From the above chart we can see that this general model has so four things: the object, light, camera, Viewport
Finally a ViewPort that we pay attention io the place, the entire virtual 3D is so big that we can not focus the whole, the general concern within one o'clock.
To note here is that OpenGL ES 3D graphics programming API. So we have done all the things which are in 3D, 2D development mentioned here, but we do make it look just two latitudes (dimension), the z-axis is set to 0.

3.Projections



Projection following two main points.
1 perspective projection (perspective projection), distant objects will be smaller, as we look reality in the eye we can see
2 parallel projection regardless of how far the object from the camera body, the object will be the same size, usually used in 2D programming
First mentioned here. Note that the article made ​​reference to the "Beginning Android Game" and "proficient Android 2" two books

http://www.easycpp.com/?p=26
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: