OpenGL ES entry (1) -- Translated from beginning Android games

Source: Internet
Author: User
Tags android games

 What is OpenGL ES? Why do we need to pay attention to it?

 

OpenGL ES is a subset of OpenGL, which is a standard for 3D drawing programming. It is especially applicable to mobile devices and embedded devices. It belongs to the khronos group and the khronos group includes companies such as ATI, NVIDIA, and Intel, which jointly define and extend OpenGL standards.

 

Speaking of OpenGL ES, it now has three versions: openg1.0, openg1.1, and openg2.0. This book only uses the first two versions. All Android devices support opengl1.0, most of which support opengl1.1. Version 1.1 adds some new functions based on Version 1.0. However, opengl2.0 breaks the compatibility with opengl1.x. You can use 1.x or 2.0, but not both. The reason is that version 1.x uses a function named fixed-function.
The pipeline Programming Model 2.0 allows you to use the so-called shadersProgramDefine rendering pipeline. Many second-generation devices already support OpenGL es2.0. However, it cannot be used well in Java packages (unless Android 2.3 is used ). OpenGL ES 1.x is enough for most games, so we will stick to opengl1.0 in this book.

 

Note: The simulator only supports OpenGL ES 1.0, and the effect is not very good, so do not debug your program on the simulator. Use a real device for debugging.

 

OpenGL ES is a collection of C Language header files provided by the khronos group. It has a very complex title book that describes the functions of these header files in APIs. For example, how the points and lines are drawn. After obtaining these specifications, the hardware manufacturer will integrate these functions into the CPU driver of the device as required. The performance of OpenGL ES varies with manufacturers. Some companies strictly follow the standards, but some companies do not. This is why some graphics processing bugs are generated. During Android development, we can't do anything about these bugs, these bugs are caused by hardware manufacturers. In the following content, I will point out some devices in OpenGL
Es features.

 

Note: OpenGL ES can be regarded as more or less powerful OpenGL standards. It differs from the latter in that some of its functions are weakened or have been removed. However, OpenGL ES is compatible with OpenGL, so your applications can be easily transplanted to desktop applications.

 

What can OpenGL ES do? A short answer is that it is a tilting and performance common 3D drawing machine. The longer answer is a bit complicated.

 

Attached Original:

 

What is OpenGL ES and why shoshould I care?

 

OpenGL ES is an industry standard for (3D) graphics programming. It is especially

Targeted at mobile and embedded devices. It is maintained by the khronos group,
Which is a conglomerate of companies including ATI, NVIDIA, and Intel, who together

Define and extend the standard.

Speaking of standards, there are currently three incremental versions of OpenGL ES: 1.0,

1.1, and 2.0. The first two are the ones we are concerned with in this book. All android

Devices support OpenGL ES 1.0, and most also support 1.1, which adds some new
Features to the 1.0 specification. OpenGL ES 2.0, however, breaks compatibility with

1. x versions. You can use either 1.xor 2.0, but not both at the same time. The reason

This is that the 1.x versions use a programming model called fixed-function pipeline, while

2.0 lets you programmatically define parts of the rendering pipeline via so-called shaders.

Generation of the second-generation devices already support OpenGL ES 2.0; however,

Java bindings are currently not in a usable state (unless you target the new Android 2.3 ).

OpenGL ES 1.x is more than good enough for most games, though, so we will stick to it

Here.

 

Note: The emulator only supports OpenGL ES 1.0. The implementation is a little shoddy, though,

So never rely on the emulator for testing. Use a real device.

 

OpenGL ES is an API that comes in the form of a set of C header files provided by the
khronos group, along with a very detailed specification of how the API defined in those
headers shoshould behave. this includes des things such as how pixels and lines have to be
rendered. hardware manufacturers then take this specification and implement it for their
GPU on top of the GPU driver. the quality of these implementations varies a little; some
companies strictly adhere to the standard (powervr) while others seem to have difficulty
sticking to the standard. this can sometimes result in GPU-dependent bugs in the
Implementation

That have nothing to do with Android itself, but with the hardware drivers

Provided by the manufacturers. I'll point out any device-specific issues along our way

Into OpenGL ES land.

Note: OpenGL ES is more or less a sibling of the more feature-rich desktop OpenGL standard. It

Deviates from the latter in that some of the functionality is already CED or completely removed.

Nevertheless, it is possible to write an application that can run with both specifications, which is

Great If You Want To port your game to the desktop as well.

So what does OpenGL ES actually do? The short answer is that's it's a lean and mean

Triangle-rendering machine. The long answer is a little bit more involved.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.