Game Development Reference
In-Depth Information
Z-buffering : A technique used to decide which elements of a rendered
scene are visible and which are hidden by using a two-dimensional
array (x-y) with one element for each screen pixel of an object that is
rendered. If another object of the scene must be rendered in the same
pixel, the graphics card compares the two depths and chooses the one
closer to the observer. The chosen depth is then saved to the z-buffer,
replacing the old one.
Surface cache : A cache that contains new pre-lighted textures
combined with the base and lightmap textures. It is used to speed up
the rendering of walls and their lightmap textures.
The Power of Code Reuse: Quake in Less Than
500 Lines of New Code
If I were a full-time PC game developer and I was told that I could have Quake (with the full
OpenGL renderer) running in Android with less than 500 lines of new code, while keeping
most of the original game intact, I'd probably say, “Are you crazy?” Once you start digging
into the source of the OpenGL renderer of the engine, you'd realize how hard it is to bring
this engine to a mobile device. Let's examine why.
OpenGL Is Not the Same as OpenGL ES
As mentioned, Quake is an engine written for the PC in 1996; nevertheless even a PC of the
'90s is arguably more powerful than some of today's phones. The problem is that the renderer
in Quake uses OpenGL, which is a superset of OpenGL ES (used in phones/tablets).
The current version of OpenGL ES 3.1 specification was publicly released in March 2014.
We covered many of the details of OpenGL ES 3.1 in Chapter 4. Here is a list of some new
functionality included in OpenGL ES 3.1:
Independent vertex
Shading language improvements
Independent fragment shaders
Optional extensions
Compute shaders
Indirect draw commands
Let's take a look at some of the differences between OpenGL and OpenGL ES.
 
Search WWH ::




Custom Search