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

Static Sub Disable ( Capacity As Integer )

Enable or disable server-side GL capabilities.

Parameters

cap

Specifies a symbolic constant indicating a GL capability.

Parameters

cap

Specifies a symbolic constant indicating a GL capability.

C Specification

void glEnablei(GLenum cap, GLuint index);

Parameters

cap

Specifies a symbolic constant indicating a GL capability.
index

Specifies the index of the swtich to enable.

C Specification

void glDisablei(GLenum cap, GLuint index);

Parameters

cap

Specifies a symbolic constant indicating a GL capability.
index

Specifies the index of the swtich to disable.

Description

Gl.Enable and Gl.Disable enable and disable various capabilities. Use Gl.IsEnabled or Gl.Get to determine the current setting of any capability. The initial value for each capability with the exception of Gl.DITHER and Gl.MULTISAMPLE is Gl.FALSE. The initial value for Gl.DITHER and Gl.MULTISAMPLE is Gl.TRUE.

Both Gl.Enable and Gl.Disable take a single argument, cap, which can assume one of the following values:

Some of the GL's capabilities are indicated. Gl.Enablei and Gl.Disablei enable and disable indexed capabilities.
Gl.BLEND

If enabled, blend the computed fragment color values with the values in the color buffers. See Gl.BlendFunc.
Gl.CLIP_DISTANCEi

If enabled, clip geometry against user-defined half space i.
Gl.COLOR_LOGIC_OP

If enabled, apply the currently selected logical operation to the computed fragment color and color buffer values. See Gl.LogicOp.
Gl.CULL_FACE

If enabled, cull polygons based on their winding in window coordinates. See Gl.CullFace.
Gl.DEPTH_CLAMP

If enabled, the -wczcwc plane equation is ignored by view volume clipping (effectively, there is no near or far plane clipping). See Gl.DepthRange.
Gl.DEPTH_TEST

If enabled, do depth comparisons and update the depth buffer. Note that even if the depth buffer exists and the depth mask is non-zero, the depth buffer is not updated if the depth test is disabled. See Gl.DepthFunc and Gl.DepthRange.
Gl.DITHER

If enabled, dither color components or indices before they are written to the color buffer.
Gl.LINE_SMOOTH

If enabled, draw lines with correct filtering. Otherwise, draw aliased lines. See Gl.LineWidth.
Gl.MULTISAMPLE

If enabled, use multiple fragment samples in computing the final color of a pixel. See Gl.SampleCoverage.
Gl.POLYGON_OFFSET_FILL

If enabled, and if the polygon is rendered in Gl.FILL mode, an offset is added to depth values of a polygon's fragments before the depth comparison is performed. See Gl.PolygonOffset.
Gl.POLYGON_OFFSET_LINE

If enabled, and if the polygon is rendered in Gl.LINE mode, an offset is added to depth values of a polygon's fragments before the depth comparison is performed. See Gl.PolygonOffset.
Gl.POLYGON_OFFSET_POINT

If enabled, an offset is added to depth values of a polygon's fragments before the depth comparison is performed, if the polygon is rendered in Gl.POINT mode. See Gl.PolygonOffset.
Gl.POLYGON_SMOOTH

If enabled, draw polygons with proper filtering. Otherwise, draw aliased polygons. For correct antialiased polygons, an alpha buffer is needed and the polygons must be sorted front to back.
Gl.PRIMITIVE_RESTART

Enables primitive restarting. If enabled, any one of the draw commands which transfers a set of generic attribute array elements to the GL will restart the primitive when the index of the vertex is equal to the primitive restart index. See Gl.PrimitiveRestartIndex.
Gl.SAMPLE_ALPHA_TO_COVERAGE

If enabled, compute a temporary coverage value where each bit is determined by the alpha value at the corresponding sample location. The temporary coverage value is then ANDed with the fragment coverage value.
Gl.SAMPLE_ALPHA_TO_ONE

If enabled, each sample alpha value is replaced by the maximum representable alpha value.
Gl.SAMPLE_COVERAGE

If enabled, the fragment's coverage is ANDed with the temporary coverage value. If Gl.SAMPLE_COVERAGE_INVERT is set to Gl.TRUE, invert the coverage value. See Gl.SampleCoverage.
Gl.SCISSOR_TEST

If enabled, discard fragments that are outside the scissor rectangle. See Gl.Scissor.
Gl.STENCIL_TEST

If enabled, do stencil testing and update the stencil buffer. See Gl.StencilFunc and Gl.StencilOp.
Gl.TEXTURE_CUBE_MAP_SEAMLESS

If enabled, modifies the way sampling is performed on cube map textures. See the spec for more information.
Gl.PROGRAM_POINT_SIZE

If enabled and a vertex or geometry shader is active, then the derived point size is taken from the (potentially clipped) shader builtin gl_PointSize and clamped to the implementation-dependent point size range.

Errors

Gl.INVALID_ENUM is generated if cap is not one of the values listed previously.

Gl.INVALID_VALUE is generated by Gl.Enablei and Gl.Disablei if index is greater than or equal to the number of indexed capabilities for cap.

Notes

Gl.PRIMITIVE_RESTART is available only if the GL version is 3.1 or greater.

Gl.TEXTURE_CUBE_MAP_SEAMLESS is available only if the GL version is 3.2 or greater.

Any token accepted by Gl.Enable or Gl.Disable is also accepted by Gl.Enablei and Gl.Disablei, but if the capability is not indexed, the maximum value that index may take is zero.

In general, passing an indexed capability to Gl.Enable or Gl.Disable will enable or disable that capability for all indices, resepectively.

Associated Gets

Gl.IsEnabled

Gl.Get

See also

Gl.Get, Gl.IsEnabled, Gl.LogicOp, Gl.PointSize, Gl.PolygonOffset, Gl.SampleCoverage, Gl.Scissor, Gl.StencilOp, Gl.TexImage1D, Gl.TexImage2D, Gl.TexImage3D

See original documentation on OpenGL website