... order: 00 100 111 000 100 00 On a small-endian architecture, they’ll be stored in this order: 000 100 00 001 001 11 Let’s take a look at that again, using hex this time The decimal number 100 00 is 27 10 in ... Projections 29 7 29 7 300 A2 Debugging A2.1 Debugging with glGetError A2 .2 Using Tracer for OpenGL ES A2.3 Pitfalls to Watch Out For 25 5 26 4 27 2 27 2 305 305 306 308 Bibliography ... Scene 21 7 21 8 21 9 22 1 22 4 22 7 22 8 Part II — Building a 3D World www.it-ebooks.info Contents 11.7 A Review 11.8 Exercises •x 23 2 23 2 12 Adding Terrain 12. 1 Creating a Height Map 12. 2...
... per side, with 16 or 18 bits of color depth, yielding 65K or 26 2K unique colors High-end devices pack screens from QVGA ( 3 20 × 24 0 pixels) upward with good contrast, rapid refresh rates, and brew.qualcomm.com/brew/en/ ... in 20 02 (see Figure 1.1) Unlike the Japanese phones, it still had a monochrome screen with a mere 96 by 65 pixels of resolution—but it did incorporate all the essential 3D rendering features; ... of all phones sold worldwide in 20 06 fall into this category, roughly half of them being S 60 and the other half BREW/WIPI phones Native applications In basic phones and feature phones, the only...
... completed by the end of 20 07 Based on historical evidence, the first devices can then be expected in late 20 08 10 www.jcp.org/en/jsr/detail?id =22 6 11 www.jcp.org/en/jsr/detail?id =28 7 ... display resolutions increase Scalable 2D vector graphics can address both of these www.jcp.org/en/jsr/detail?id =23 9 INTRODUCTION 22 problems If the content is represented as shapes such as curves and ... smart phones, modern games consoles, and beyond All OpenGL ES2. x devices are expected to ship withES 1.1 drivers Details of the 2. x standard are beyond the scope of this book GLSL ES is closely...
... producing the second component, and so on: ⎡ [ m 00 ⎢ ⎢[ m v = Mv = ⎢ 10 ⎣[ m 20 [ m 30 m01 m11 m21 m31 m 02 m 12 m 22 m 32 ⎤ m03 ] · v ⎥ m13 ] · v⎥ ⎥ m23 ] · v⎦ (2. 9) m33 ] · v Note that for this to work, ... stands for the m01 m11 m21 m31 m 02 m 12 m 22 m 32 m03 m13 m23 m33 ⎤ ⎥ ⎥ ⎥, ⎦ (2. 7) while a column vector v has components vi : ⎡ ⎤ v0 ⎢ ⎥ v1 ⎥ ⎢ v = ⎢ ⎥ = [ v0 v1 v2 v3 ]T ⎣v2 ⎦ (2. 8) v3 The transpose ... = Mv = v0 ⎢ 10 ⎥ + v1 ⎢ 11 ⎥ + v2 ⎢ 12 ⎥ + v3 ⎢ 13 ⎥ ⎣m 20 ⎦ ⎣m21 ⎦ ⎣m 22 ⎦ ⎣m23 ⎦ m 30 m31 m 32 (2. 10) m33 The product of two matrices, on the other hand, produces another matrix, which can be...
... following rotation matrix: ⎡ w + x2 − y2 − z2 ⎢ ⎢ 2xy + 2wz R(ˆ = ⎢ q) ⎣ 2xz − 2wy 2xy − 2wz w2 − x2 + y2 − z2 2yz + 2wx 2xz + 2wy 2yz − 2wx − x2 − y2 + z2 w ⎤ ⎥ 0 ⎥ 0 (2. 22) Note, however, that quaternions ... is the matrix ⎤ ⎡ h 0 ⎥ ⎢ 0 0⎥ (2. 26) H01 (h) = ⎢ ⎥, 0 0⎦ 0 where the term in the first row and second column is set to h = to create the shear in the last image of Figure 2. 5 In this case, the ... the size and potentially also shape The scaling matrix is ⎤ ⎡ sx 0 ⎥ ⎢ ⎢ sy 0 (2. 24) S(sx , sy , sz ) = ⎢ ⎥, ⎣ 0 sz 00 which scales the x component of a vector by sx , the y component by sy ,...
... white light, (1 .0, 0. 0, 0. 0) provides bright red, and (0. 0, 0. 0, 0. 3) corresponds to dark blue Larger values are simply clamped to 1 .0, so (11 .0, 22 .0, 0. 5) will become (1 .0, 1 .0, 0. 5) at the time ... boundaries, there are usually 0. 5–1 .0 vertices 2 1 GL_LINES GL_TRIANGLES 5 GL_LINE_LOOP GL_TRIANGLE_STRIP GL_LINE_STRIP GL_POINTS 3 GL_TRIANGLE_FAN F i g u r e 3.3: The geometric primitives in ... cars, and trees that are close enough are drawn using geometric primitives 2D games are often designed and implemented using sprites, small raster images that are directly placed on the 2D window...
... can be approximated by (0, 0, 1) Finally, the cosine term is raised to a shininess power nspec A large nspec , e.g., 128 , attenuates the reflectance very quickly, and produces a small and sharp ... model fluorescent and phosphorescent materials 3 .2. 4 LIGHTS OpenGL defines several simple light sources: the global ambient light, point lights, directional lights, and spot lights These lights ... image in one go However, if clipping the primitives introduces new vertices at image boundaries, and unless the colors and possibly other properties are interpolated using exactly the same algorithm...
... the area of the texture map that corresponds to (0, 1) (0, 1) (1, 1) (0, 0) (a) (1, 1) (1, 0) (0, 0) (1, 0) (b) (0, 1) (0, 0) (1, 1) (1, 0) (c) F i g u r e 3. 12: (a) The (s, t) coordinate system ... coordinates (0. 0, 0. 0) and the top right image corner has coordinates (1 .0, 1 .0) During rasterization, the texture coordinates are interpolated If the values of q are different on different vertices, ... texture coordinates of the unit 3.4 .2 INTERPOLATING GRADIENTS The simplest way to spread the values at vertices across triangles is to choose the values at one of the vertices and assign the...
... produces a better-looking blend of the fog color 1 .0 0.8 0. 6 0. 4 EXP 0 .2 EXP2 LINEAR 0.0 20 40 60 80 100 F i g u r e 3 . 20 : Fog functions In this example, LINEAR fog starts from 20 and ends at 70, ... at near distances, or with small density values, as shown in Figure 3 . 20 , the functions have different shapes Whereas EXP begins to attenuate much more sharply, EXP2 first attenuates more gradually, ... real fog, but gives less control as the attenuation in the beginning is always so severe EXP2 can sometimes give the esthetically most pleasing results LOW-LEVEL RENDERING 90 Performance tip:...
... bits where values range from to 25 5, but can only store bits with a range from to 15 Now all values between 64 and 80 (01 00000 and 01 0 100 0 in binary) map to either or (01 00 or 01 01) If you simply ... LIFE CYCLE OF A FRAME SECTION 3.6 103 CPU N N11 N 12 N13 T&L N21 N N11 N 12 N13 Rasterizer N 22 N21 N N11 N 12 N13 Flip N23 N 22 N21 N N 12 N 12 N13 F i g u r e 3 .26 : Parallelism of asynchronous multibuffered ... perhaps 100 00 : However, in scenes that not have very bright lights, bits, or 25 6 levels, are sufficient to produce color transitions that appear continuous and seamless Since bits also matches pretty...
... coefficients specific to a Hermite curve: ⎤ 2 1 ⎥ ⎢ ⎢ −3 2 −1 ⎥ M=⎢ ⎥ ⎣ 0 ⎦ 0 ⎡ (4.8) As we have mentioned, there are numerous other classes of curves and splines used in computer graphics One type ... of describing predefined motions in computer graphics The term originates from cartoons, where the senior animator would first draw the most important “key” frames describing the main poses within ... keyframes For further reading on other kinds of curves, again, refer to more comprehensive computer graphics textbooks [FvFH 90, AMH 02 , WW 92] 4.1 .2 QUATERNIONS Interpolating positions and most other...
... indices define a new triangle For example, triangle T2 is formed by the vertices 2, 4, and SCENE MANAGEMENT 1 20 Appearance Material Fog Compositing Mode Polygon Mode Texture2D Image2D Texture2D ... s r t g b s r t g b s t T3 T2 T1 indices T1 triangles T2 3 T3 T4 F i g u r e 5 .2: Triangle meshes are formed by indexing a set of vertex arrays Here the triangles are organized into a triangle ... the mesh; see Section 3.4.1 for details IndexBuffers define the surface of the mesh by connecting vertices into triangles, as shown in Figure 5 .2 OpenGL ES defines three ways to form triangles from...