Download presentation
Presentation is loading. Please wait.
Published byJuliana Summers Modified over 9 years ago
1
1 3D API OPENGL ES v1.0 Owned by Silicon Graphics (SGL) Control was then transferred to Khronos Group Introduction
2
2 OPENGL ES v1.0 Android includes libraries for both 3D and 2D graphics + Surface manager Android includes libraries for both 3D and 2D graphics + Surface manager Structure of OPENGL ES Commands: Structure of OPENGL ES Commands: Rtype Name { 1 2 3 4 } { i x f ub ui} { v} Rtype Name { 1 2 3 4 } { i x f ub ui} { v} Void glColor4f (GLfloat r, GLfloat g, GLfloat b, GLfloat a); -- Immediate Mode 1. Points 2. Lines 3. Triangles All are specified with vertices + Colors, Normals & Texture Vertices Type of vertices
3
3 Rendering primitives (1/2) Immediate Mode Immediate Mode Using Arrays Using Arrays Using Vertex Buffer Objects (VBO’s) Using Vertex Buffer Objects (VBO’s) Bind a newly generated buffer object to a target: GL_ARRAY_BUFFER GL_ELEMENTS_ARRAY_BUFFER Before using an arrays containing primitive data: Enable the array/s. Enable the array/s. Pointers to those arrays need to be specified. Pointers to those arrays need to be specified. One can also modify part or all the buffer object’s data
4
4 Rendering primitives (2/2) The last step is to display the vertices: glDrawArrays(); glDrawArrays(); glDrawElements(); glDrawElements();
5
5 Coordinate Transformation GL_MODEL_VIEW GL_MODEL_VIEW GL_PROJECTION GL_PROJECTION glMartixMode glMartixMode
6
6 Rasterization (1/2) The process of converting each primitive into 2D so that it can be shown on the screen Deals with Fragments Antialiasing can be enabled for both points and lines, In which case blending needs to be enabled also Antialiasing can be enabled for both points and lines, In which case blending needs to be enabled also Multisampling can also be enabled in which all primitives can use (including triangle primitives) Multisampling can also be enabled in which all primitives can use (including triangle primitives)
7
7 Rasterization (2/2) Textures: texel value is obtained which corresponds to a texture map. Textures: texel value is obtained which corresponds to a texture map. Smaller textures can be loaded on a larger one. Smaller textures can be loaded on a larger one. Finally Fog can also be Enabled and specified. Finally Fog can also be Enabled and specified.
8
8 Per-Fragment Operations 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. 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.
9
9 Questions
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.