Chapter 5: Integrating Mesa-OpenGL into FPGA-based ES ·································
5.2 OpenGL ES ·················································································
The OpenGL ES is the standard for embedded accelerated 2D and 3D graphics (Angle and Shreiner 2008, and KHRONOS 2013). It provides a graphics API – a low-level interface between software applications and hardware or software graphics engines.
As the hardware conditions of ESs are more limited by their small sizes and designated applications than desktop computers, an implementation of OpenGL ES can be turned into one of subsets of the desktop OpenGL. The family of OpenGL ES implementations may have various versions for different pipelines and multiple hardware platforms, which may or may not be integrated with EGL (Native Platform Graphics Interface Layer, detailed in Section 5.3.1). Each implementation can be a much smaller engine with few function calls.
Compared with the desktop OpenGL, the archive of OpenGL ES includes profiles not only for floating-point systems but also for fixed-point systems. It also provides the EGL specification for portability between different native windowing systems. As an implementation of the OpenGL ES has a closer bind with hardware devices than the desktop OpenGL, the porting of OpenGL ES from one platform to another is more difficult and brings about more detailed issues for transplanting.
5.2.1 Versions and Profiles of OpenGL ES
The OpenGL ES has several subsets of OpenGL standard for ESs. It is divided in two ways, versions and profiles. The former is for different ways in the programming; the latter for different dimensions on the footprint.
Chapter 5 Integrating Mesa-OpenGL into FPGA-based ES 86
5.2.1.1 Versions
Since the graphics requirements have a broad range of 3D devices and platforms in embedded markets, the OpenGL ES has been developed two versions with two different roadmaps, which are for two different development requirements and platforms and have evolved in two different directions, respectively. They are OpenGL ES 1.X and 2.X, both of which have their counterparts in OpenGL.
The OpenGL ES 1.X is for fixed function hardware. Its goals are to enhance hardware acceleration, to improve image quality and performance, and to reduce the memory bandwidth. It is also a software interface that consists of a set of procedures and functions. The function calls can be used not only to implement rendering but also to support transformations, matrix stacks, Phong lighting, fog, and others. The programmer can specify a state by calling a specific function to control the state machine in producing graphical images of 3D objects. It can be applied to the new-generation fixed function 3D accelerators.
The OpenGL ES 2.X is for programmable hardware. It defines a programmable 3D graphics pipeline to create shader objects and to write vertex and fragment shaders in the OpenGL ES Shading Language. Since almost all graphics operations are done in shaders, its interface is very small, and focuses on specifying geometry and textures, and dealing with shaders and their variables. It can be applied to the emerging programmable 3D pipelines.
Even though the OpenGL ES 1.x is more fixed in functions compared to the OpenGL ES 2.X, it does not mean that the use of functions of the OpenGL ES 1.x is fixed during programming applications. There is still a lot of room to adjust and optimise the order of function calls and disable some unnecessary modules in the pipeline during programming to speed up the object rendering and save the memory space.
5.2.1.2 Profiles
The definition of profiles of the OpenGL ES specification is dependent on their application fields. Each profile has its own emphasis, adopts part of the desktop OpenGL specification, and extends its own OpenGL ES-specific part as well. For the part derived from the OpenGL, each OpenGL ES profile retains the similar API, processing pipeline, command structure, and the same name space as the OpenGL. For the extension part, it adds OpenGL ES-specific functions to the OpenGL specification in order to meet the needs of embedded platforms. Three profiles have been issued. They are Common, Common-Lit, and Safety Critical Platforms. As the family of OpenGL ES profiles still grows, along with new technologies emerging in the ESs, more profiles may be issued in the future.
Chapter 5 Integrating Mesa-OpenGL into FPGA-based ES 87
market support for platforms that have different computation and memory abilities, such as full-functioned and texture-mapping 3D graphics with minimum footprint, gaming platform, and cell phone platform. The Common Profile supports the floating-point computations.
Because it focuses on a simple class of graphics system with a small footprint and only supports the fixed-point calculations, the Common-Lite profile does not support high-performance OpenGL functions that need the floating-point computations. The Common and Common-Lit profiles not only share many commands, but also have some commands designated to only one of them.
The Safety Critical Profile has high requirements on being reliable and certifiable. It can meet the needs of 3D graphics applications in avionics and automotive displays, and safety certifications.
5.2.2 OpenGL ES Implementations
Since the OpenGL ES is derived from the OpenGL, many resources and development experiences of OpenGL can be applied to the OpenGL ES. These make it feasible a crossing-platform migration from desktops to different embedded platforms. The OpenGL ES also makes it affordable to provide the diversity of 3D graphics and games in the mainstream of embedded and mobile platforms. According to KHRONOS 2013, the OpenGL ES has had many implementations that are of some companies, such as Intel, Imagination Technologies, QUALCOMM, ARM, Marvell, Apple, NVIDIA, Creative Technology Ltd, Media Tek Inc, and NOKIA OYL.