Another step toward OpenGL [3]: OpenGL displaylist, which must be exceeded

Source: Internet
Author: User

OpenGL displaylist is something to learn about OpenGL. However, compared with VBO, we cannot modify data, which makes it possible to use it to process static objects. If we want to support dynamic objects, we will be overwhelmed.

------------------------------------------------------------

Display list is one of the fastest methods to draw static data because vertex data and OpenGL commands are cached in the display list and minimize data transmissions from the client to the server side. it means that it uses ces cpu cycles to perform the actual data transfer.

------------------------------------------------------------

Unfortunately, like glbegin/glend, it is not included in OpenGL ES.

------------------------------------------------------------

OpenGL ES Specification 1.0

5.4 display lists
Display lists are not supported. display lists are used by using applications-sometimes to achieve better performance and sometimes for convenience. the implementation complexity associated with display lists is too large for the implementation targets envisioned for this profile.
------------------------------------------------------------

Therefore, displaylist may have to be surpassed. After all, the support for OpenGL ES is a question that developers have to think about.

The basic process of creating and referencing displaylist is as follows:

// create one display list
GLuint index = glGenLists(1);

// compile the display list, store a triangle in it
glNewList(index, GL_COMPILE);
glBegin(GL_TRIANGLES);
glVertex3fv(v0);
glVertex3fv(v1);
glVertex3fv(v2);
glEnd();
glEndList();


// draw the display list
glCallList(index);


// delete it if it is not used any more
glDeleteLists(index, 1);

Reference:

Http://www.songho.ca/opengl/gl_displaylist.html

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.