

We need to do a View Transformation to adjust a world space to view space. View Space: It’s also called Eye Space or Camera Space.In general, there are 3 kinds of model transformation: Scaling, Rotation and Translation. So the model transformation here is actually left-multiplied a Model Metrics, after that we got a world space. In computer graphics, a transformation is usually done by a matrix multiplication. World Space: After a Model Transformation, different objects are put into a same world space.Different objects have different local space. Local Space: After a graphics object is created, the origin coordinates is in the center of the object(0, 0, 0).There are 5 different coordinate systems in OpenGL. After rasterization, every fragment will execute Fragment Shader once to determine the color, and its related global variable is “ gl_FragColor “, it’s used to determine the final color of the fragment. There must be a global variable called “ gl_Position ” in its main method, it’s used to assemble all the vertices into dot, line or triangle. First, every vertex will execute its Vertex Shader to know the final position of each vertex. There are several steps for OpenGL to render graphics. The language shader use is called GLSL, full name is OpenGL Shader Language, it’s a C like language.Īnother important knowledge in OpenGL is Graphics Pipeline. There are two types of shader, Vertex Shader and Fragment Shader. They are used to describe how to render the graphics. Shaders played a very important role in this process as you can see in the figure. So rasterization is actually a process of generating fragments.

Rasterization is a process to map point, line or triangle into pixels on the screen, every mapping area is called a fragment. To understand the fragment better, we need to know about Rasterization. And fragments corresponding to pixels, usually a fragment is a pixel, but in some high resolution devices, a fragment may have more pixels. All graphics starts with vertex, a list of vertices can form a piece of graph. There’re two basic ideas in OpenGL, vertex and fragment. In Android platform, several versions of the OpenGL ES API are supported, but why OpenGL ES 2.0? Because it does a great job both in compatibility and performance, you can check it here. OpenGL ES a flavor or subset of the OpenGL specification, it’s intended for embedded devices like smart phones, PDA and game consoles. It’s a abbreviation for Open Graphics Library for Embedded Systems. Well, one way to do that is through OpenGL ES. And you may wonder how do app developers build all those complex graphics and animations in a game. The performance of your smart phone’s GPU is important, especially when you are playing 3D games. Today most android devices in the market has a GPU, we all know that it’s a hardware unit for processing 3D graphics.
