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.GetError (gb.opengl)

Static Function GetError ( ) As Integer

Return error information.

Description

Gl.GetError returns the value of the error flag. Each detectable error is assigned a numeric code and symbolic name. When an error occurs, the error flag is set to the appropriate error code value. No other errors are recorded until Gl.GetError is called, the error code is returned, and the flag is reset to Gl.NO_ERROR. If a call to Gl.GetError returns Gl.NO_ERROR, there has been no detectable error since the last call to Gl.GetError, or since the GL was initialized.

To allow for distributed implementations, there may be several error flags. If any single error flag has recorded an error, the value of that flag is returned and that flag is reset to Gl.NO_ERROR when Gl.GetError is called. If more than one flag has recorded an error, Gl.GetError returns and clears an arbitrary error flag value. Thus, Gl.GetError should always be called in a loop, until it returns Gl.NO_ERROR, if all error flags are to be reset.

Initially, all error flags are set to Gl.NO_ERROR.

The following errors are currently defined:
Gl.NO_ERROR

No error has been recorded. The value of this symbolic constant is guaranteed to be 0.
Gl.INVALID_ENUM

An unacceptable value is specified for an enumerated argument. The offending command is ignored and has no other side effect than to set the error flag.
Gl.INVALID_VALUE

A numeric argument is out of range. The offending command is ignored and has no other side effect than to set the error flag.
Gl.INVALID_OPERATION

The specified operation is not allowed in the current state. The offending command is ignored and has no other side effect than to set the error flag.
Gl.INVALID_FRAMEBUFFER_OPERATION

The framebuffer object is not complete. The offending command is ignored and has no other side effect than to set the error flag.
Gl.OUT_OF_MEMORY

There is not enough memory left to execute the command. The state of the GL is undefined, except for the state of the error flags, after this error is recorded.

When an error flag is set, results of a GL operation are undefined only if Gl.OUT_OF_MEMORY has occurred. In all other cases, the command generating the error is ignored and has no effect on the GL state or frame buffer contents. If the generating command returns a value, it returns 0. If Gl.GetError itself generates an error, it returns 0.

See original documentation on OpenGL website