Gambas文档
编译和安装
错误消息
代码片段
待办事项
废弃的组件
教程
开发环境文档
开发者文档
名词解释
如何操作
说明
维基手册
维基搜索
维基许可协议
文档
应用程序仓库
语言概览
语言索引
主题
组件
gb
gb.args
gb.cairo
gb.chart
gb.clipper
gb.complex
gb.compress
gb.crypt
gb.data
gb.db
gb.db.form
gb.db.mysql
gb.db.odbc
gb.db.postgresql
gb.db.sqlite2
gb.db.sqlite3
gb.dbus
gb.dbus.trayicon
gb.debug
gb.desktop
gb.desktop.x11
gb.eval
gb.eval.highlight
gb.form
gb.form.dialog
gb.form.editor
gb.form.htmlview
gb.form.mdi
gb.form.print
gb.form.terminal
gb.gmp
gb.gsl
gb.gtk
gb.gtk3
gb.gtk3.opengl
gb.gtk3.webview
gb.gui
gb.gui.qt
gb.gui.qt.ext
gb.gui.trayicon
gb.gui.webview
gb.hash
gb.highlight
gb.image
gb.image.effect
gb.image.io
gb.inotify
gb.logging
gb.map
gb.media
gb.media.form
gb.mime
gb.mongodb
gb.mysql
gb.ncurses
gb.net
gb.net.curl
gb.net.pop3
gb.net.smtp
gb.opengl
Gl
gb.opengl.glsl
gb.opengl.glu
gb.opengl.sge
gb.openssl
gb.option
gb.pcre
gb.pdf
gb.poppler
gb.qt4
gb.qt4.ext
gb.qt4.opengl
gb.qt4.webkit
gb.qt4.webview
gb.qt5
gb.qt5.ext
gb.qt5.opengl
gb.qt5.webview
gb.qt6
gb.qt6.ext
gb.qt6.opengl
gb.qt6.webview
gb.report
gb.report2
gb.sdl
gb.sdl2
gb.sdl2.audio
gb.settings
gb.signal
gb.term
gb.test
gb.util
gb.util.web
gb.v4l
gb.vb
gb.web
gb.web.feed
gb.web.form
gb.web.gui
gb.xml
gb.xml.html
gb.xml.rpc
gb.xml.xslt
最近的修改

Gl.NewList (gb.opengl)

Static Sub NewList ( Index As Integer, Mode As Integer )

Create or replace a display list.

Parameters

list

Specifies the display-list name.
mode

Specifies the compilation mode, which can be Gl.COMPILE or Gl.COMPILE_AND_EXECUTE.

Description

Display lists are groups of GL commands that have been stored for subsequent execution. Display lists are created with Gl.NewList. All subsequent commands are placed in the display list, in the order issued, until Gl.EndList is called.

Gl.NewList has two arguments. The first argument, list, is a positive integer that becomes the unique name for the display list. Names can be created and reserved with Gl.GenLists and tested for uniqueness with Gl.IsList. The second argument, mode, is a symbolic constant that can assume one of two values:
Gl.COMPILE

Commands are merely compiled.
Gl.COMPILE_AND_EXECUTE

Commands are executed as they are compiled into the display list.

Certain commands are not compiled into the display list but are executed immediately, regardless of the display-list mode. These commands are Gl.AreTexturesResident, Gl.ColorPointer, Gl.DeleteLists, Gl.DeleteTextures, Gl.DisableClientState, Gl.EdgeFlagPointer, Gl.EnableClientState, Gl.FeedbackBuffer, Gl.Finish, Gl.Flush, Gl.GenLists, Gl.GenTextures, Gl.IndexPointer, Gl.InterleavedArrays, Gl.IsEnabled, Gl.IsList, Gl.IsTexture, Gl.NormalPointer, Gl.PopClientAttrib, Gl.PixelStore, Gl.PushClientAttrib, Gl.ReadPixels, Gl.RenderMode, Gl.SelectBuffer, Gl.TexCoordPointer, Gl.VertexPointer, and all of the Gl.Get commands.

Similarly, Gl.TexImage1D, Gl.TexImage2D, and Gl.TexImage3D are executed immediately and not compiled into the display list when their first argument is Gl.PROXY_TEXTURE_1D, Gl.PROXY_TEXTURE_1D, or Gl.PROXY_TEXTURE_3D, respectively.

When the ARB_imaging extension is supported, Gl.Histogram executes immediately when its argument is Gl.PROXY_HISTOGRAM. Similarly, Gl.ColorTable executes immediately when its first argument is Gl.PROXY_COLOR_TABLE, Gl.PROXY_POST_CONVOLUTION_COLOR_TABLE, or Gl.PROXY_POST_COLOR_MATRIX_COLOR_TABLE.

For OpenGL versions 1.3 and greater, or when the ARB_multitexture extension is supported, Gl.ClientActiveTexture is not compiled into display lists, but executed immediately.

When Gl.EndList is encountered, the display-list definition is completed by associating the list with the unique name list (specified in the Gl.NewList command). If a display list with name list already exists, it is replaced only when Gl.EndList is called.

Notes

Gl.CallList and Gl.CallLists can be entered into display lists. Commands in the display list or lists executed by Gl.CallList or Gl.CallLists are not included in the display list being created, even if the list creation mode is Gl.COMPILE_AND_EXECUTE.

A display list is just a group of commands and arguments, so errors generated by commands in a display list must be generated when the list is executed. If the list is created in Gl.COMPILE mode, errors are not generated until the list is executed.

Errors

Gl.INVALID_VALUE is generated if list is 0.

Gl.INVALID_ENUM is generated if mode is not an accepted value.

Gl.INVALID_OPERATION is generated if Gl.EndList is called without a preceding Gl.NewList, or if Gl.NewList is called while a display list is being defined.

Gl.INVALID_OPERATION is generated if Gl.NewList or Gl.EndList is executed between the execution of Gl.Begin and the corresponding execution of Gl.End.

Gl.OUT_OF_MEMORY is generated if there is insufficient memory to compile the display list. If the GL version is 1.1 or greater, no change is made to the previous contents of the display list, if any, and no other change is made to the GL state. (It is as if no attempt had been made to create the new display list.)

Associated Gets

Gl.IsList

Gl.Get with argument Gl.LIST_INDEX

Gl.Get with argument Gl.LIST_MODE

See also

See original documentation on OpenGL website