3d graphics using opengl es 2 0

3D Graphics with OpenGL ES and M3G- P1 pps

3D Graphics with OpenGL ES and M3G- P1 pps

... States of America 07 08 09 10 11 5 4 3 2 1 Trang 6CHAPTER 1 INTRODUCTION 1 1.1 About this Book 2 1.2 Graphics on Handheld Devices 3 1.3 Mobile Graphics Standards 12 CHAPTER 2 LINEAR ALGEBRA FOR 3D ... Group and OpenGL ES 157 7.2 Design Principles 158 7.3 Resources 159 7.4 API Overview 161 7.5 Hello, OpenGL ES! 170 CHAPTER 8 OPENGL ES TRANSFORMATION AND 8.1 Drawing Primitives 173 8.2 Vertex ... 9.2 Texture Mapping 196 9.4 Antialiasing 211 9.5 Pixel Tests 214 9.6 Applying Fragments to the Color Buffer 218 CHAPTER 10 MISCELLANEOUS OPENGL ES FEATURES 223 10.1 Frame Buffer Operations 223

Ngày tải lên: 03/07/2014, 11:20

10 308 0
3D Graphics with OpenGL ES and M3G- P19 pdf

3D Graphics with OpenGL ES and M3G- P19 pdf

... vertices for single triangle) */ static const GLbyte vertices[3 * 3] = { —1,1,0, 1, — 1, 0, 1, 1, 0 }; static const GLubyte colors[3 * 4] = { 255, 0, 0, 255, 0, 255, 0, 255, 0, 0, 255, 255 }; ... exception of display lists these features are not wi dely used even in desktop OpenGL. OpenGL ES 1.0 supports only queries for static state whose values are defined when an OpenGL context is created, ... library OpenGL ES 1.x with EGL (Common Profile) libGLES_CM.{lib,dll,a,so} OpenGL ES 1.x with EGL (Lite Profile) libGLES_CL.{lib,dll,a,so} OpenGL ES 1.x without EGL (Common Profile) libGLESv1_CM.{lib,dll,a,so}

Ngày tải lên: 03/07/2014, 11:20

10 236 0
3D Graphics with OpenGL ES and M3G- P20 ppt

3D Graphics with OpenGL ES and M3G- P20 ppt

... iangles using both of these methods. static const GLbyte vertices1[8*2] = { 0,0, 0,0, — 20,20, 20,20, — 20,40, 20,40, — 20,60, 20,60 }; static const GLbyte vertices2[7*2] = { 0,100, 100,0, 0, — 100, ... indices[9] = { 0,3,1, 1,3,2, 4,6,5 }; static const GLbyte vertices[7*2] = { 0,100, 100,0, 0,-100, -100,0, 0,50, 45,20, -45,20 }; static const GLubyte colors[7*4] = { 0,0,255,255, 0,255,0,255, 255,0,0,255, ... ); glVertex3f( 0.0f, 0.0f, 0.0f ); glColor4f ( 0.0f, 1.0f, 0.0f, 1.0f ); glVertex3f( 1.0f, 1.0f, 0.0f ); glVertex3f( 1.0f, 0.0f, 0.0f ); glEnd(); The function glBegin indicates the primitive

Ngày tải lên: 03/07/2014, 11:20

10 191 0
3D Graphics with OpenGL ES and M3G- P21 pps

3D Graphics with OpenGL ES and M3G- P21 pps

... values, and pname must be one of the following values (the value in parentheses is the corresponding default color): GL_AMBIENT (0.2, 0.2, 0.2, 1.0) GL_DIFFUSE (0.8, 0.8, 0.8, 1.0) GL_SPECULAR (0.0, ... the pnames and their default values are GL_DIFFUSE (1, 1, 1, 1) for GL_LIGHT0, (0,0,0,0) for others GL_SPECULAR (1, 1, 1, 1) for GL_LIGHT0, (0,0,0,0) for others GL_SPOT_DIRECTION (0, 0, –1) The ... GL_AMBIENT (0.2, 0.2, 0.2, 1.0) GL_DIFFUSE (0.8, 0.8, 0.8, 1.0) GL_SPECULAR (0.0, 0.0, 0.0, 1.0) GL_EMISSIVE (0.0, 0.0, 0.0, 1.0) It is also possible to use GL_AMBIENT_AND_DIFFUSE to set both the ambient

Ngày tải lên: 03/07/2014, 11:20

10 242 0
3D Graphics with OpenGL ES and M3G- P22 ppsx

3D Graphics with OpenGL ES and M3G- P22 ppsx

... 32bpp colors */ Trang 9OPENGL ES RASTERIZATION AND FRAGMENT PROCESSING80,80,80,255, 90,90,90,255, 100,100,100,255, 110,110,110,255, 120,120,120,255, 130,130,130,255, 140,140,140,255, 150,150,150,255, ... PALTEX(12,14), PALTEX(0,2), PALTEX(4,6), PALTEX(8,10), PALTEX(12,14), PALTEX(0,2), PALTEX(4,6), PALTEX(8,10), PALTEX(12,14), PALTEX(0,2), PALTEX(4,6), PALTEX(8,10), PALTEX(12,14), PALTEX(0,2), PALTEX(4,6), ... 150,150,150,255, /* mipmap level 0 (base) is (8x8), one palette index is 4 bits */ PALTEX(0,2), PALTEX(4,6), PALTEX(8,10), PALTEX(12,14), PALTEX(0,2), PALTEX(4,6), PALTEX(8,10), PALTEX(12,14), PALTEX(0,2),

Ngày tải lên: 03/07/2014, 11:20

10 319 0
3D Graphics with OpenGL ES and M3G- P23 docx

3D Graphics with OpenGL ES and M3G- P23 docx

... glTranslatef( 0.5, 0.5, 0.0f ); glRotatef( time*20, 0.f, 0.f, 1.f ); glTranslatef( — 0.5, — 0.5, 0.0f ); /* the second unit has a light map */ glActiveTexture( GL_TEXTURE1 ); glEnable( GL_TEXTURE_2D ); ... texture_data_mip_1 ); glTexImage2D( GL_TEXTURE_2D, 2, GL_RGBA, 2, 2, 0, GL_RGBA, GL_UNSIGNED_BYTE, texture_data_mip_2 ); glTexImage2D( GL_TEXTURE_2D, 3, GL_RGBA, 1, 1, 0, GL_RGBA, GL_UNSIGNED_BYTE, ... from 0.0 This is repeated twice more, at 1.0 and 2.0 The end result is that the texture map repeats 3.7 times between the two vertices The wrap modes are set separately for s and t coordinates

Ngày tải lên: 03/07/2014, 11:20

10 268 0
3D Graphics with OpenGL ES and M3G- P24 potx

3D Graphics with OpenGL ES and M3G- P24 potx

... 0x00000000, 0xffffffff ); glStencilOp( GL_KEEP, GL_KEEP, GL_INCR ); draw_shadow_volumes(); /* render back triangles only */ glCullFace( GL_FRONT ); /* DECRement stencil where depth test passes ... GL_KEEP, GL_DECR ); draw_shadow_volumes(); /* pass stencil test ONLY when stencil is zero (not in shadow) */ glStencilFunc( GL_EQUAL, 0x00000000, 0xffffffff ); /* process only visible surface front ... draw_scene_with_normal_light(); 218 OPENGL ES RASTERIZATION AND FRAGMENT PROCESSING CHAPTER 9 9.5.4 DEPTH TESTING Depth testing is the final test in the OpenGL ES fragment pipeline. It is used for sorting the primitives at

Ngày tải lên: 03/07/2014, 11:20

10 195 0
3D Graphics with OpenGL ES and M3G- P25 pdf

3D Graphics with OpenGL ES and M3G- P25 pdf

... alpha. GL_SRC012_RGB texture combine source 012 for color. GL_SRC012_ALPHA texture combine source 012 for alpha. GL_OPERAND012_RGB texture combine operand 012 for color. GL_OPERAND012_ALPHA texture ... 0), 1.0, and 0 Here is an example of how these calls are used: glClearColorf( 1.0f, 0.0f, 0.0f, 0.0f ); glClearDepthf( 1.0f ); glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); 10.1.2 READING ... state, OpenGL ES 1.0 does not support querying anyof the dynamic state OpenGL ES 1.1, on the other hand, has wide support for dynamic state queries 10.2.1 STATIC STATE In OpenGL ES 1.0 only the

Ngày tải lên: 03/07/2014, 11:20

10 204 0
3D Graphics with OpenGL ES and M3G- P26 potx

3D Graphics with OpenGL ES and M3G- P26 potx

... glLoadIdentity(); glTranslatef( 0, 0, -4.f ); glScalef( 0.2f, 0.2f, 0.2f); /* set up matrices in palette indices 0 and 1 */ glMatrixMode( GL_MATRIX_PALETTE_OES ); _glCurrentPaletteMatrix( 0 ); _glLoadPaletteFromModelViewMatrix(); ... glTranslatef( 0.7f, 0, 0 ); _glCurrentPaletteMatrix( 0 ); _glLoadPaletteFromModelViewMatrix(); glTranslatef( -0.2f, 0, 0 ); void glCurrentPaletteMatrixOES(GLuint matrixpaletteindex) defines which matrix ... 110.4 EXTENSIONSOpenGL ES inherits the extension mechanism of the desktop OpenGL Any vendor can create their own extensions to the basic behavior Additionally, the OpenGL ES specifica-tion defines

Ngày tải lên: 03/07/2014, 11:20

10 218 0
3D Graphics with OpenGL ES and M3G- P27 pot

3D Graphics with OpenGL ES and M3G- P27 pot

... EGL_RED_SIZE 0 AtLeast Special 2 EGL_GREEN_SIZE 0 AtLeast Special 2 EGL_BLUE_SIZE 0 AtLeast Special 2 EGL_ALPHA_SIZE 0 AtLeast Special 2 EGL_BUFFER_SIZE 0 AtLeast Smaller 3 EGL_SAMPLE_BUFFERS 0 AtLeast ... scene with OpenGL ES and then render some 2D overlay information to the same surface with OpenVG. Also, as the OpenGL ES 2.0 API is completely separate from OpenGL ES 1.x, it is addressed in future ... context shares all the shareable data with share_context and with the contexts that share_context shares data with, unless share_context is set to EGL_NO_CONTEXT. With OpenGL ES 1.0 and EGL 1.0 only

Ngày tải lên: 03/07/2014, 11:20

10 262 0
3D Graphics with OpenGL ES and M3G- P28 pot

3D Graphics with OpenGL ES and M3G- P28 pot

... that submits about 3000 small triangles for rendering each frame. Triangles are drawn as separate triangles, so about 9000 vertices have to be processed each frame. This test was run on a Nokia ... phone call requires her attention. Under some power management schemes, even if the 3D engine does not produce any new frames, some reserved resources may prevent deeper sleep modes of the hardware. ... code to EGL_CONTEXT_LOST. In these cases the application is responsible for restoring the OpenGL ES state from scratch, including textures, matrices, and other states. In addition to the EGL power

Ngày tải lên: 03/07/2014, 11:20

10 107 0
3D Graphics with OpenGL ES and M3G- P10 docx

3D Graphics with OpenGL ES and M3G- P10 docx

... 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, ... the texture map As a result, borders were dropped from OpenGL ES CHAPTER SECTION 3.4 RASTERIZATION 128 128 10% 79 64 64 15% 32 32 34% 16 16 60% F i g u r e 3.14: Rendering a light bloom effect by...

Ngày tải lên: 03/07/2014, 11:20

10 448 0

Bạn có muốn tìm thêm với từ khóa:

w