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

Static Function GetFramebufferAttachmentParameterivEXT ( Target As Integer, Attachment As Integer, Pname As Integer ) As Integer[]

Parameters

target

Specifies the target of the query operation.
attachment

Specifies the attachment within target
pname

Specifies the parameter of attachment to query.
params

Specifies the address of a variable receive the value of pname for attachment.

Description

Gl.GetFramebufferAttachmentParameter returns information about attachments of a bound framebuffer object. target specifies the framebuffer binding point and must be Gl.DRAW_FRAMEBUFFER, Gl.READ_FRAMEBUFFER or Gl.FRAMEBUFFER. Gl.FRAMEBUFFER is equivalent to Gl.DRAW_FRAMEBUFFER.

If the default framebuffer is bound to target then attachment must be one of Gl.FRONT_LEFT, Gl.FRONT_RIGHT, Gl.BACK_LEFT, or Gl.BACK_RIGHT, identifying a color buffer, Gl.DEPTH, identifying the depth buffer, or Gl.STENCIL, identifying the stencil buffer.

If a framebuffer object is bound, then attachment must be one of Gl.COLOR_ATTACHMENTi, Gl.DEPTH_ATTACHMENT, Gl.STENCIL_ATTACHMENT, or Gl.DEPTH_STENCIL_ATTACHMENT. i in Gl.COLOR_ATTACHMENTi must be in the range zero to the value of Gl.MAX_COLOR_ATTACHMENTS - 1.

If attachment is Gl.DEPTH_STENCIL_ATTACHMENT and different objects are bound to the depth and stencil attachment points of target the query will fail. If the same object is bound to both attachment points, information about that object will be returned.

Upon successful return from Gl.GetFramebufferAttachmentParameteriv, if pname is Gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, then params will contain one of Gl.NONE, Gl.FRAMEBUFFER_DEFAULT, Gl.TEXTURE, or Gl.RENDERBUFFER, identifying the type of object which contains the attached image. Other values accepted for pname depend on the type of object, as described below.

If the value of Gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE is Gl.NONE, no framebuffer is bound to target. In this case querying pname Gl.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME will return zero, and all other queries will generate an error.

If the value of Gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE is not Gl.NONE, these queries apply to all other framebuffer types:
  • If pname is Gl.FRAMEBUFFER_ATTACHMENT_RED_SIZE, Gl.FRAMEBUFFER_ATTACHMENT_GREEN_SIZE, Gl.FRAMEBUFFER_ATTACHMENT_BLUE_SIZE, Gl.FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE, Gl.FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE, or Gl.FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE, then params will contain the number of bits in the corresponding red, green, blue, alpha, depth, or stencil component of the specified attachment. Zero is returned if the requested component is not present in attachment.
  • If pname is Gl.FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE, params will contain the format of components of the specified attachment, one of Gl.FLOAT, GL_INT, GL_UNSIGNED_INT, GL_SIGNED_NORMALIZED, or GL_UNSIGNED_NORMALIZED for floating-point, signed integer, unsigned integer, signed normalized fixed-point, or unsigned normalized fixed-point components respectively. Only color buffers may have integer components.
  • If pname is Gl.FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING, param will contain the encoding of components of the specified attachment, one of Gl.LINEAR or Gl.SRGB for linear or sRGB-encoded components, respectively. Only color buffer components may be sRGB-encoded; such components are treated as described in sections 4.1.7 and 4.1.8. For the default framebuffer, color encoding is determined by the implementation. For framebuffer objects, components are sRGB-encoded if the internal format of a color attachment is one of the color-renderable SRGB formats.

If the value of Gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE is Gl.RENDERBUFFER, then:
  • If pname is Gl.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME, params will contain the name of the renderbuffer object which contains the attached image.

If the value of Gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE is Gl.TEXTURE, then:
  • If pname is Gl.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME, then params will contain the name of the texture object which contains the attached image.
  • If pname is Gl.FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL, then params will contain the mipmap level of the texture object which contains the attached image.
  • If pname is Gl.FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE and the texture object named Gl.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME is a cube map texture, then params will contain the cube map face of the cubemap texture object which contains the attached image. Otherwise params will contain the value zero.
  • If pname is Gl.FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER and the texture object named Gl.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME is a layer of a three-dimensional texture or a one-or two-dimensional array texture, then params will contain the number of the texture layer which contains the attached image. Otherwise params will contain the value zero.
  • If pname is Gl.FRAMEBUFFER_ATTACHMENT_LAYERED, then params will contain Gl.TRUE if an entire level of a three-dimesional texture, cube map texture, or one-or two-dimensional array texture is attached. Otherwise, params will contain Gl.FALSE.

Any combinations of framebuffer type and pname not described above will generate an error.

Errors

Gl.INVALID_ENUM is generated if target is not one of the accepted tokens.

Gl.INVALID_ENUM is generated if pname is not valid for the value of Gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE.

Gl.INVALID_OPERATION is generated if attachment is not the accepted values for target.

Gl.INVALID_OPERATION is generated if attachment is Gl.DEPTH_STENCIL_ATTACHMENT and different objects are bound to the depth and stencil attachment points of target.

Gl.INVALID_OPERATION is generated if the value of Gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE is Gl.NONE and pname is not Gl.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME.

See also

Gl.GenFramebuffers Gl.BindFramebuffer

See original documentation on OpenGL website