代码之家  ›  专栏  ›  技术社区  ›  jay.lee

opengl重新编译显示列表

  •  0
  • jay.lee  · 技术社区  · 14 年前

    如果要重新编译现有的已编译显示列表,是否需要先调用glDeleteLists()和glGenLists()?或者可以通过对现有已编译的显示列表ID调用glNewList()来重新编译显示列表?

    1 回复  |  直到 14 年前
        1
  •  4
  •   Bahbar    14 年前

    打电话给glNewList/glEndList就够了。

    请注意,删除仅在glEndList调用时生效:

    If a  display list with name `list` already exists, 
    it is replaced only when glEndList is called.
    

    如果您希望先前的列表被释放,那么无论如何,一定要调用 glDeleteLists . 直言不讳当然没有坏处。