开发者

opengl recompile display list

If an existing compiled display list is to be recompiled, is it necessary to call glDeleteLists() and glGenLists() first? Or ca开发者_C百科n the display list be recompiled by just calling glNewList() on the existing compiled display list ID?


Just calling glNewList/glEndList should be enough.

Note that the deletion only becomes effective on the glEndList call:

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

If you'd rather have the previous list freed earlier, then by all means, do call glDeleteLists. Being explicit certainly does not hurt.

Last bit... glGenLists is never required. You can always call glNewList on any positive integer, even if it was not provided through glGenLists. The main reason for the glGenLists API is to make sure the name is not already in use. But you already know that if you just deleted it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜