1 / 9

3D API

Introduction. 3D API. OPENGL ES v1.0. Owned by Silicon Graphics (SGL). Control was then transferred to Khronos Group. OPENGL ES v1.0. Android includes libraries for both 3D and 2D graphics + Surface manager. Structure of OPENGL ES Commands:

ziya
Download Presentation

3D API

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

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

  3. Rendering primitives (1/2) • Immediate Mode • Using Arrays • Using Vertex Buffer Objects (VBO’s) • 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: • Enable the array/s. • Pointers to those arrays need to be specified.

  4. Rendering primitives (2/2) The last step is to display the vertices: • glDrawArrays(); • glDrawElements();

  5. Coordinate Transformation • GL_MODEL_VIEW glMartixMode • GL_PROJECTION

  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 • Multisampling can also be enabled in which all primitives can use (including triangle primitives)

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

  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.

  9. Questions

More Related