3 D API Introduction OPENGL ES v 1

  • Slides: 9
Download presentation
3 D API Introduction OPENGL ES v 1. 0 Owned by Silicon Graphics (SGL)

3 D API Introduction OPENGL ES v 1. 0 Owned by Silicon Graphics (SGL) Control was then transferred to Khronos Group 1

OPENGL ES v 1. 0 n Android includes libraries for both 3 D and

OPENGL ES v 1. 0 n Android includes libraries for both 3 D and 2 D graphics + Surface manager n Structure of OPENGL ES Commands: Rtype Name { 1 2 3 4 } { i x f ub ui} { v} Void gl. Color 4 f (GLfloat r, GLfloat g, GLfloat b, GLfloat a); -- Immediate Mod Type of vertices 1. 2. 3. Points Lines Triangles All are specified with vertices + Colors, Normals & Texture Vertices 2

Rendering primitives (1/2) Immediate Mode n Using Arrays n Using Vertex Buffer Objects (VBO’s)

Rendering primitives (1/2) Immediate Mode n Using Arrays n Using Vertex Buffer Objects (VBO’s) n ØBind a newly generated buffer object to a target: ØGL_ARRAY_BUFFER ØGL_ELEMENTS_ARRAY_BUFFER One can also modify part or all the buffer object’s data Before using an arrays containing primitive data: n Enable the array/s. n Pointers to those arrays need to be specified. 3

Rendering primitives (2/2) The last step is to display the vertices: n gl. Draw.

Rendering primitives (2/2) The last step is to display the vertices: n gl. Draw. Arrays(); n gl. Draw. Elements(); 4

Coordinate Transformation ngl. Martix. Mo n de GL_MODEL_VIEW n GL_PROJECTION 5

Coordinate Transformation ngl. Martix. Mo n de GL_MODEL_VIEW n GL_PROJECTION 5

Rasterization (1/2) The process of converting each primitive into 2 D so that it

Rasterization (1/2) The process of converting each primitive into 2 D so that it can be shown on the screen Deals with Fragments n Antialiasing can be enabled for both points and lines, In which case blending needs to be enabled also n Multisampling can also be enabled in which all primitives can use (including triangle primitives) 6

Rasterization (2/2) n n n Textures: texel value is obtained which corresponds to a

Rasterization (2/2) n n n Textures: texel value is obtained which corresponds to a texture map. Finally Fog can also be Enabled textures and specified. Smaller can be loaded on a larger one. 7

Per-Fragment Operations n Several tests which are done on each fragment if a fragment

Per-Fragment Operations n Several tests which are done on each fragment if a fragment passes then this fragment is converted into a pixel and would be stored in the Framebuffer. 8

Questions 9

Questions 9