Learn OpenGL ES for Mobile Game and Graphics Development [Mehta 2013-08-29].pdf
(
5908 KB
)
Pobierz
For your convenience Apress has placed some of the front
matter material after the index. Please use the Bookmarks
and Contents at a Glance links to access them.
Contents at a Glance
About the Author �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½xi
About the Technical Reviewer �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½xiii
Acknowledgments �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½
xv
Preface �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½
xvii
■
Chapter 1: Benefits of the New API �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½1
■
Chapter 2: Implementation Prerequisites�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½29
■
Chapter 3: ES 2�½0 Fundamentals �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½55
■
Chapter 4: 3D Modeling �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½93
■
Chapter 5: Texturing and Shading �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½141
■
Chapter 6: Taking the Development Ahead �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½169
Index �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½195
v
Chapter
1
Benefits of the New API
In this chapter I introduce you to OpenGL ES 2.0, and account for its increasing popularity compared
to older graphic rendering APIs for embedded devices. I describe OpenGL ES 2.0’s support from
computer-graphics communities and leading embedded and mobile device vendors, which helps to
ensure its increasing popularity. Finally, I show how easy it is to get started with ES 2.0 on Android
devices, when we take our first step towards game development, by creating a blank OpenGL
surface view.
This chapter assumes you have some experience of setting up Android Software Development Kit
(SDK) for Eclipse and installing SDK Platform for various API levels from SDK Manager.
Modern Graphic-rendering API
OpenGL ES (Open Graphics Library for Embedded Systems) is an API (Application Programming
Interface) for rendering 3D graphics on embedded devices, such as mobiles, tablets, and gaming
consoles.
The OpenGL ES 1.0 and ES 1.1 APIs (referred to jointly as OpenGL ES 1.x) were released by the
non-profit
Khronos Group
as a fixed-function graphic-rendering API. OpenGL ES 1.x API does not
provide graphics application developers full access to underlying hardware, because most rendering
functions in this API are hard-coded, leading to popular names—“fixed-function graphic rendering
API” or “fixed-function pipeline.”
Unlike OpenGL ES 1.x API, OpenGL ES 2.0 API was released as a programmable graphic-rendering
API (programmable pipeline), giving developers full access to the underlying hardware through
shaders
(discussed in Chapter 3).
Graphics rendered through a fixed-function pipeline involve device-provided algorithms for most
rendering effects. These algorithms (and the rendering functions based on them) cannot be modified.
They are fixed because they were made for special purpose graphics cards, for a specific data-flow.
Because of the fixed functionality of OpenGL ES 1.x API, graphics hardware could be optimized for
faster rendering.
1
2
CHAPTER 1: Benefits of the New API
In contrast, a programmable graphic-rendering API is a more flexible API and requires a general
purpose graphics card, enabling graphic developers to unleash the huge potential of modern GPUs.
Technically, the programmable pipeline is slower than the fixed function pipeline; however, graphics
rendered using the programmable pipeline can be greatly enhanced because of flexibility offered by
new general purpose graphics cards. OpenGL ES 2.0 combines
GLSL
(OpenGL
Shading Language)
with a modified subset of OpenGL ES 1.1 that has removed any fixed functionality. Chapter 3
discusses OpenGL Shading Language.
Note
GLSL
is the OpenGL Shading Language for programming vertex and fragment shaders. Shaders are
programs in programmable pipelines that help users work on two separate aspects of object rendering: vertex
marking and color filling.
With OpenGL ES 2.0, enhancements in various effects, such as lighting/shading effects (as shown
in Figure
1-1—a
basic shading example), no longer have any restrictions, compared to ES 1.x. What
is required is transformation of creative ideas for any such effects into algorithms, then into custom
functions executed on the graphics card, which would be impossible in ES 1.x.
Figure 1-1.
ADS (Ambient Diffuse Specular) shading in OpenGL ES 2.0
OpenGL ES 2.0 is derived from the larger OpenGL 2.0 API, the programmable pipeline for rendering
3D graphics on desktops. ES 2.0 is a suitable subset of OpenGL, optimized for resource constrained
display devices, such as mobiles, tablets, and gaming consoles. ES 2.0 contains only the most
useful methods from OpenGL 2.0 API, with redundant techniques removed. This allows OpenGL ES
2.0 on handheld devices to deliver rich game content like its parent API.
Plik z chomika:
musli_com
Inne pliki z tego folderu:
Computer Graphics through OpenGL_ From Theory to Experiments (2nd ed.) [Guha 2014-08-06].pdf
(159794 KB)
OpenGL SuperBible_ Comprehensive Tutorial and Reference (6th ed.) [Sellers, Wright & Haemel 2013-07-31].pdf
(91323 KB)
Computer Graphics with OpenGL (4th ed.) [Hearn, Baker & Carithers 2013].pdf
(24929 KB)
OpenGL ES 2 for Android_ A Quick-Start Guide [Brothaler 2013-07-06].pdf
(31348 KB)
OpenGL SuperBible_ Comprehensive Tutorial and Reference (5th ed.) [Wright, Haemel, Sellers & Lipchak 2010-08-02].pdf
(26612 KB)
Inne foldery tego chomika:
3D Design - Programming
ActionScript
Actionscript - Flash - Flex - Air
Ada
ADO
Zgłoś jeśli
naruszono regulamin