OpenGL-ES 2.0 VS OpenGL-ES 1.1, which is faster?

I wrote an application using OpenGL-ES 1.1, but I am interested to know if there is an increase in speed by switching to 2.0. Has anyone done any tests using models with lots of polygons? I just want to display triangles that have different colors, nothing out of the ordinary. However, I want to display about 1 million triangles for my comparative test.

+8
ios iphone opengl-es
source share
2 answers

OpenGL ES 1.1 and 2.0 provide two very different ways to perform three-dimensional graphics, so I donโ€™t know that direct performance comparisons make a lot of sense. You will probably see identical performance using both if you create shaders 2.0 that simply mimic the OpenGL ES 1.1 fixed function pipeline. This is confirmed by Apple's PowerVR SGX documentation that states:

The graphics driver for PowerVR SGX also implements OpenGL ES 1.1 efficiently using a fixed-function pipeline using shaders.

To render basic triangles with a flat flower, I suggest switching to OpenGL ES 1.1 simply because you will need to write a lot less code. If you can get by with the built-in functionality in version 1.1, itโ€™s usually easier to target that version. You also have a slightly larger market, as it can target (now) a minority of iOS device owners to hardware that does not support 2.0.

However, OpenGL ES 2.0 allows you to do a lot more with its vertex and fragment shaders than 1.1, so some of the things you can do with extensive geometry can be handled by shaders. This can make more spectacular and faster effects.

For example, I am finishing updating my molecular rendering using shaders 2.0, which greatly increase the resolution of rendered structures. I do this using custom shaders that generate raytraced impostors for the spheres and cylinders in these structures. These objects look perfectly round and smooth at any magnification. Doing this in OpenGL ES 1.1 with pure geometry would be practically impossible, because the number of triangles required would be ridiculous (also billboards would not work well for my cylinders, and the intersection of these figures would not be processed right in this case).

There may be a few triangles for these devices. In my tests, the old iPhone 3G occupied about 500,000 triangles per second, and the first generation iPad took about 2,000,000. I did not fully test the much faster iPad 2, but my early tests showed it in about 8,000,000 - 10,000,000 triangles. per second. Even on the fastest device, you get only 10 FPS on the millionth triangular scene in the best devices. Most likely, you do not need this geometry size, so I would do everything I could to reduce this in the first place.

+14
source share

The performance boost in ES 2.0 is not in rendering single VBOs, but through

1) performance settings in user shaders to perform only the minimum required and not more general fixed functions

2) the rendering of a large number of objects due to the simplification of the matrix pipeline and the removal of the matrix stack and the โ€œfixed functionโ€, which should determine new shaders during state changes and eliminate the need for multi-pass rendering for some effects.

This allows, for example, the CPU to perform all dynamic matrix transformations in a separate thread, ignoring static matrices and avoiding unnecessary transfers between CPU-> GPUs. There is no need to constantly redo the camera matrix between changes in the state of 2D and 3D in shader versions.

+1
source share

All Articles