zoukankan      html  css  js  c++  java
  • OpenGL之再向虎山行[3]:OpenGL DisplayList,还得被超越

    OpenGL Displaylist是学OpenGL是都要碰到的东西。但是与VBO相比,我们不能进行修改数据,这也就决定了用它来处理静态不变的物体尚可,如果想支持Dynamic Object,就捉襟见肘了。

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

    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 reduces CPU cycles to perform the actual data transfer.

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

    但是,不幸的是,它与glBegin/glEnd一样,并未被纳入OpenGL ES的范畴。

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

    OpenGl ES specification 1.0

    5.4 Display Lists
    Display lists are not supported. Display lists are used by many 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.
    ------------------------------------------------------------

    所以,对于DisplayList,也许还得超越,毕竟,对OpenGL ES的支持是开发者们不得不思考的问题。

    创建与引用DisplayList的基本过程如下:

    // 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

  • 相关阅读:
    不容易发现的错误
    Element-UI 笔记
    工作中常用的操作/经验
    记录一些前端强大的插件
    HttpContext.Current.ApplicationInstance.Application vs HttpContext.Current.Application
    What Is a Replay Attack?
    ASP.NET's Data Storage Objects
    JSON Web Token (JWT) RFC7519
    Session-State Modes
    After change SessionID data in Session variables is lost
  • 原文地址:https://www.cnblogs.com/piaoger/p/2184485.html
Copyright © 2011-2022 走看看