record TGLFramebuffer

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TGLFramebuffer = record

Description

A framebuffer

Overview

Methods

procedure New; inline;
procedure Delete; inline;
class function GetCurrent: TGLFramebuffer; static; inline;
procedure Bind; inline;
function IsBound: Boolean; inline;
function Status: TGLFramebufferStatus; inline;
procedure AttachRenderbuffer(const AAttachment: TGLFramebufferAttachment; const ARenderbuffer: TGLRenderbuffer); inline;
procedure DetachRenderbuffer(const AAttachment: TGLFramebufferAttachment); inline;
procedure AttachTexture(const AAttachment: TGLFramebufferAttachment; const ATexture: TGLTexture; const ACubeTarget: TGLCubeTarget = 0); inline;
procedure DetachTexture(const AAttachment: TGLFramebufferAttachment); inline;
function GetAttachedObjectType(const AAttachment: TGLFramebufferAttachment): TGLFramebufferAttachmentType; inline;
function GetAttachedTexture(const AAttachment: TGLFramebufferAttachment): TGLTexture; inline;
function GetAttachedRenderbuffer(const AAttachment: TGLFramebufferAttachment): TGLRenderbuffer; inline;
function GetAttachedTextureLevel(const AAttachment: TGLFramebufferAttachment): Integer; inline;
function GetAttachedCubeMapFace(const AAttachment: TGLFramebufferAttachment): TGLCubeTarget; inline;
procedure ReadPixels(const ALeft, ABottom, AWidth, AHeight: Integer; const AData: Pointer; const AFormat: TGLPixelFormat = TGLPixelFormat.RGBA; const ADataType: TGLPixelDataType = TGLPixelDataType.UnsignedByte); inline;
function GetRedBits: Integer; inline;
function GetGreenBits: Integer; inline;
function GetBlueBits: Integer; inline;
function GetAlphaBits: Integer; inline;
function GetDepthBits: Integer; inline;
function GetStencilBits: Integer; inline;
function GetSampleBuffers: Integer; inline;
function GetSamples: Integer; inline;
class function GetColorReadFormat: TGLPixelFormat; inline; static;
class function GetColorReadType: TGLPixelDataType; inline; static;

Properties

property Handle: GLuint read FHandle;

Description

Methods

procedure New; inline;

Creates a framebuffer.

No framebuffer objects are associated with the returned framebuffer object names until they are first bound by calling Bind.

OpenGL API: glGenFramebuffers

See also
Bind
Binds the framebuffer.
Delete
Deletes the framebuffer.
procedure Delete; inline;

Deletes the framebuffer.

After a framebuffer object is deleted, it has no attachments, and its name is free for reuse (for example by New). If a framebuffer object that is currently bound is deleted, the binding reverts to 0 (the window-system-provided framebuffer).

OpenGL API: glDeleteFramebuffers

See also
Bind
Binds the framebuffer.
New
Creates a framebuffer.
class function GetCurrent: TGLFramebuffer; static; inline;

Returns the current framebuffer.

Note: do not delete this framebuffer.

Note: if you call Current before you create any custom framebuffers, then the returned value can be regarded as the default framebuffer. Note that this is not always the "system" framebuffer, since you are not allowed to access that framebuffer on some devices.

See also
New
Creates a framebuffer.
Bind
Binds the framebuffer.
procedure Bind; inline;

Binds the framebuffer.

Bind lets you create or use a named framebuffer object. When a framebuffer object is bound, the previous binding is automatically broken.

Framebuffer object names are unsigned integers. The value zero is reserved to represent the "system" framebuffer provided by the windowing system. Framebuffer object names and the corresponding framebuffer object contents are local to the shared object space of the current GL rendering context.

You may use New to generate a new framebuffer object name.

The state of a framebuffer object immediately after it is first bound is three attachment points (ColorAttachment, DepthAttachment, and StencilAttachment) each with None as the object type.

While a framebuffer object name is bound, all rendering to the framebuffer (with gl.DrawArrays and gl.DrawElements) and reading from the framebuffer (with ReadPixels, TGLTexture.Copy, or TGLTexture.SubCopy) use the images attached to the application-created framebuffer object rather than the default window-system-provided framebuffer.

Application created framebuffer objects differ from the default window-system-provided framebuffer in a few important ways. First, they have modifiable attachment points for a color buffer, a depth buffer, and a stencil buffer to which framebuffer attachable images may be attached and detached. Second, the size and format of the attached images are controlled entirely within the GL and are not affected by window-system events, such as pixel format selection, window resizes, and display mode changes. Third, when rendering to or reading from an application created framebuffer object, the pixel ownership test always succeeds (i.e. they own all their pixels). Fourth, there are no visible color buffer bitplanes, only a single "off-screen" color image attachment, so there is no sense of front and back buffers or swapping. Finally, there is no multisample buffer.

A framebuffer object binding created with Bind remains active until a different framebuffer object name is bound, or until the bound framebuffer object is deleted with Delete.

Note: you cannot unbind a framebuffer. If you want to revert back to the default framebuffer, then you should call TGLFramebuffer.GetCurrent before you generate a new framebuffer. Then you can bind to the that framebuffer later to revert back to it.

OpenGL API: glBindFramebuffer

See also
New
Creates a framebuffer.
Delete
Deletes the framebuffer.
AttachRenderbuffer
Attach a renderbuffer to this framebuffer.
AttachTexture
Attach a texture to this framebuffer.
IsBound
Checks if this framebuffer is currently bound.
function IsBound: Boolean; inline;

Checks if this framebuffer is currently bound.

Returns

True if this is the currently bound framebuffer, False otherwise.

function Status: TGLFramebufferStatus; inline;

Return the framebuffer completeness status.

The returned value identifies whether or not the currently bound framebuffer is framebuffer complete, and if not, which of the rules of framebuffer completeness is violated.

If the currently bound framebuffer is not framebuffer complete, then it is an error to attempt to use the framebuffer for writing or reading. This means that rendering commands (gl.Clear, gl.DrawArrays, and gl.DrawElements) as well as commands that read the framebuffer (ReadPixels, TGLTexture.Copy, and TGLTexture.SubCopy) will generate the error InvalidFramebufferOperation if called while the framebuffer is not framebuffer complete.

Note: it is strongly advised, thought not required, that an application call Status to see if the framebuffer is complete prior to rendering. This is because some implementations may not support rendering to particular combinations of internal formats.

Note: the default window-system-provided framebuffer is always framebuffer complete, and thus Complete is returned when there is no bound application created framebuffer.

Note: in DEBUG mode with assertions enabled, an error will be logged to the debug console if this framebuffer is not bound.

OpenGL API: glCheckFramebufferStatus

Returns

The completeness status.

See also
TGLRenderbuffer.Bind
Binds the renderbuffer.
TGLTexture.Copy
Copies pixels from the current framebuffer into the texture.
TGLTexture.SubCopy
Copies pixels from a part of the current framebuffer into the texture.
gl.DrawArrays
gl.DrawElements
Render primitives from array data, using indices from a bound index buffer.
ReadPixels
Read a block of pixels from the frame buffer.
TGLRenderbuffer.Storage
Create and initialize a renderbuffer object's data store.
procedure AttachRenderbuffer(const AAttachment: TGLFramebufferAttachment; const ARenderbuffer: TGLRenderbuffer); inline;

Attach a renderbuffer to this framebuffer.

This method attaches the renderbuffer specified by ARenderbuffer as one of the logical buffers of the currently bound framebuffer object. AAttachment specifies whether the renderbuffer should be attached to the framebuffer object's color, depth, or stencil buffer. A renderbuffer may not be attached to the default framebuffer object name 0.

Note: if a renderbuffer object is deleted while its image is attached to the currently bound framebuffer, then it is as if DetachRenderbuffer had been called for the attachment point to which this image was attached in the currently bound framebuffer object. In other words, the renderbuffer image is detached from the currently bound framebuffer. Note that the renderbuffer image is specifically not detached from any non-bound framebuffers. Detaching the image from any non-bound framebuffers is the responsibility of the application.

Note: in DEBUG mode with assertions enabled, an error will be logged to the debug console if this framebuffer is not bound.

OpenGL API: glFramebufferRenderbuffer

Parameters
AAttachment
the attachment point to which ARenderbuffer should be attached.
ARenderbuffer
the renderbuffer to attach.
Exceptions raised
TGLError.InvalidOperation
if no framebuffer is bound.
See also
DetachRenderbuffer
Detach a renderbuffer from this framebuffer.
Bind
Binds the framebuffer.
TGLRenderbuffer.Bind
Binds the renderbuffer.
Status
Return the framebuffer completeness status.
Delete
Deletes the framebuffer.
TGLRenderbuffer.Delete
Deletes the renderbuffer.
AttachTexture
Attach a texture to this framebuffer.
TGLRenderbuffer.Storage
Create and initialize a renderbuffer object's data store.
procedure DetachRenderbuffer(const AAttachment: TGLFramebufferAttachment); inline;

Detach a renderbuffer from this framebuffer.

Note: in DEBUG mode with assertions enabled, an error will be logged to the debug console if this framebuffer is not bound.

OpenGL API: glFramebufferRenderbuffer

Parameters
AAttachment
the attachment point from which the renderbuffer should be detached.
Exceptions raised
TGLError.InvalidOperation
if no framebuffer is bound.
See also
AttachRenderbuffer
Attach a renderbuffer to this framebuffer.
procedure AttachTexture(const AAttachment: TGLFramebufferAttachment; const ATexture: TGLTexture; const ACubeTarget: TGLCubeTarget = 0); inline;

Attach a texture to this framebuffer.

This method attaches the texture image specified by ATexture as one of the logical buffers of the currently bound framebuffer object. AAttachment specifies whether the texture image should be attached to the framebuffer object's color, depth, or stencil buffer. A texture image may not be attached to the default framebuffer object name 0.

Note: special precautions need to be taken to avoid attaching a texture image to the currently bound framebuffer while the texture object is currently bound and potentially sampled by the current vertex or fragment shader. Doing so could lead to the creation of a "feedback loop" between the writing of pixels by rendering operations and the simultaneous reading of those same pixels when used as texels in the currently bound texture. In this scenario, the framebuffer will be considered framebuffer complete, but the values of fragments rendered while in this state will be undefined. The values of texture samples may be undefined as well.

Note: if a texture object is deleted while its image is attached to the currently bound framebuffer, then it is as if DetachTexture had been called for the attachment point to which this image was attached in the currently bound framebuffer object. In other words, the texture image is detached from the currently bound framebuffer. Note that the texture image is specifically not detached from any non-bound framebuffers. Detaching the image from any non-bound framebuffers is the responsibility of the application.

Note: in DEBUG mode with assertions enabled, an error will be logged to the debug console if this framebuffer is not bound.

OpenGL API: glFramebufferTexture2D

Parameters
AAttachment
the attachment point to which ATexture should be attached.
ATexture
the texture to attach.
ACubeTarget
(optional) if this ATexture is a cube texture, then this parameter specifies which of the 6 cube faces to attach. This parameter is ignored for 2D textures.
Exceptions raised
TGLError.InvalidOperation
if no framebuffer is bound.
See also
DetachTexture
Detach a texture from this framebuffer.
Bind
Binds the framebuffer.
TGLTexture.Bind
Binds the texture.
Status
Return the framebuffer completeness status.
Delete
Deletes the framebuffer.
TGLTexture.Delete
Deletes the texture.
AttachRenderbuffer
Attach a renderbuffer to this framebuffer.
TGLTexture.GenerateMipmap
Generate a complete set of mipmaps for this texture object.
TGLTexture.Upload
Uploads an image to the texture.
procedure DetachTexture(const AAttachment: TGLFramebufferAttachment); inline;

Detach a texture from this framebuffer.

Note: in DEBUG mode with assertions enabled, an error will be logged to the debug console if this framebuffer is not bound.

OpenGL API: glFramebufferTexture2D

Parameters
AAttachment
the attachment point from which the texture should be detached.
Exceptions raised
TGLError.InvalidOperation
if no framebuffer is bound.
See also
AttachTexture
Attach a texture to this framebuffer.
function GetAttachedObjectType(const AAttachment: TGLFramebufferAttachment): TGLFramebufferAttachmentType; inline;

Returns the type of object attached to an attachment point of the framebuffer.

Note: in DEBUG mode with assertions enabled, an error will be logged to the debug console if this framebuffer is not bound.

OpenGL API: glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE)

Parameters
AAttachment
the attachment point to check.
Returns

The type of attachment attached to this point.

Exceptions raised
TGLError.InvalidOperation
if no framebuffer is bound.
See also
Bind
Binds the framebuffer.
AttachRenderbuffer
Attach a renderbuffer to this framebuffer.
AttachTexture
Attach a texture to this framebuffer.
GetAttachedTexture
Returns the texture attached to an attachment point of the framebuffer.
GetAttachedRenderbuffer
Returns the renderbuffer attached to an attachment point of the framebuffer.
GetAttachedTextureLevel
Returns the mipmap level of the texture attached to an attachment point of the framebuffer.
GetAttachedCubeMapFace
Returns the cube map face of the cube-map texture attached to an attachment point of the framebuffer.
function GetAttachedTexture(const AAttachment: TGLFramebufferAttachment): TGLTexture; inline;

Returns the texture attached to an attachment point of the framebuffer.

Note: in DEBUG mode with assertions enabled, an error will be logged to the debug console if this framebuffer is not bound.

OpenGL API: glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME)

Parameters
AAttachment
the attachment point to check.
Returns

The texture attached to this point.

Exceptions raised
TGLError.InvalidOperation
if no framebuffer is bound.
TGLError.InvalidOperation
if no texture is attached to the given attachment point.
See also
Bind
Binds the framebuffer.
AttachRenderbuffer
Attach a renderbuffer to this framebuffer.
AttachTexture
Attach a texture to this framebuffer.
GetAttachedObjectType
Returns the type of object attached to an attachment point of the framebuffer.
GetAttachedRenderbuffer
Returns the renderbuffer attached to an attachment point of the framebuffer.
GetAttachedTextureLevel
Returns the mipmap level of the texture attached to an attachment point of the framebuffer.
GetAttachedCubeMapFace
Returns the cube map face of the cube-map texture attached to an attachment point of the framebuffer.
function GetAttachedRenderbuffer(const AAttachment: TGLFramebufferAttachment): TGLRenderbuffer; inline;

Returns the renderbuffer attached to an attachment point of the framebuffer.

Note: in DEBUG mode with assertions enabled, an error will be logged to the debug console if this framebuffer is not bound.

OpenGL API: glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME)

Parameters
AAttachment
the attachment point to check.
Returns

The renderbuffer attached to this point.

Exceptions raised
TGLError.InvalidOperation
if no framebuffer is bound.
TGLError.InvalidOperation
if no renderbuffer is attached to the given attachment point.
See also
Bind
Binds the framebuffer.
AttachRenderbuffer
Attach a renderbuffer to this framebuffer.
AttachTexture
Attach a texture to this framebuffer.
GetAttachedObjectType
Returns the type of object attached to an attachment point of the framebuffer.
GetAttachedTexture
Returns the texture attached to an attachment point of the framebuffer.
GetAttachedTextureLevel
Returns the mipmap level of the texture attached to an attachment point of the framebuffer.
GetAttachedCubeMapFace
Returns the cube map face of the cube-map texture attached to an attachment point of the framebuffer.
function GetAttachedTextureLevel(const AAttachment: TGLFramebufferAttachment): Integer; inline;

Returns the mipmap level of the texture attached to an attachment point of the framebuffer.

Note: in DEBUG mode with assertions enabled, an error will be logged to the debug console if this framebuffer is not bound.

OpenGL API: glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL)

Parameters
AAttachment
the attachment point to check.
Returns

The mipmap level of texture attached to this point.

Exceptions raised
TGLError.InvalidOperation
if no framebuffer is bound.
TGLError.InvalidOperation
if no texture is attached to the given attachment point.
See also
Bind
Binds the framebuffer.
AttachRenderbuffer
Attach a renderbuffer to this framebuffer.
AttachTexture
Attach a texture to this framebuffer.
GetAttachedObjectType
Returns the type of object attached to an attachment point of the framebuffer.
GetAttachedRenderbuffer
Returns the renderbuffer attached to an attachment point of the framebuffer.
GetAttachedTexture
Returns the texture attached to an attachment point of the framebuffer.
GetAttachedCubeMapFace
Returns the cube map face of the cube-map texture attached to an attachment point of the framebuffer.
function GetAttachedCubeMapFace(const AAttachment: TGLFramebufferAttachment): TGLCubeTarget; inline;

Returns the cube map face of the cube-map texture attached to an attachment point of the framebuffer.

Note: in DEBUG mode with assertions enabled, an error will be logged to the debug console if this framebuffer is not bound.

OpenGL API: glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE)

Parameters
AAttachment
the attachment point to check.
Returns

The cube map face of texture attached to this point.

Exceptions raised
TGLError.InvalidOperation
if no framebuffer is bound.
TGLError.InvalidOperation
if no texture is attached to the given attachment point.
See also
Bind
Binds the framebuffer.
AttachRenderbuffer
Attach a renderbuffer to this framebuffer.
AttachTexture
Attach a texture to this framebuffer.
GetAttachedObjectType
Returns the type of object attached to an attachment point of the framebuffer.
GetAttachedRenderbuffer
Returns the renderbuffer attached to an attachment point of the framebuffer.
GetAttachedTexture
Returns the texture attached to an attachment point of the framebuffer.
GetAttachedTextureLevel
Returns the mipmap level of the texture attached to an attachment point of the framebuffer.
procedure ReadPixels(const ALeft, ABottom, AWidth, AHeight: Integer; const AData: Pointer; const AFormat: TGLPixelFormat = TGLPixelFormat.RGBA; const ADataType: TGLPixelDataType = TGLPixelDataType.UnsignedByte); inline;

Read a block of pixels from the frame buffer.

This method returns pixel data from the frame buffer, starting with the pixel whose lower left corner is at location (ALeft, ABottom), into client memory starting at location AData. The TGLPixelStoreMode.PackAlignment parameter, set with the gl.PixelStore command, affects the processing of the pixel data before it is placed into client memory.

Pixels are returned in row order from the lowest to the highest row, left to right in each row.

AFormat specifies the format for the returned pixel values. RGBA color components are read from the color buffer. Each color component is converted to floating point such that zero intensity maps to 0.0 and full intensity maps to 1.0.

Unneeded data is then discarded. For example, TGLPixelFormat.Alpha discards the red, green, and blue components, while PackAlignment.RGB discards only the alpha component. The final values are clamped to the range 0..1.

Finally, the components are converted to the proper format, as specified by ADataType. When type is TGLPixelDataType.UnsignedByte (the default), each component is multiplied by 255. When ADataType is TGLPixelDataType.UnsignedShort565, UnsignedShort4444 or UnsignedShort5551, each component is multiplied accordingly.

Note: if the currently bound framebuffer is not the default framebuffer object, color components are read from the color image attached to the TGLFramebufferAttachment.Color attachment point.

Note: only two AFormat/ADataType parameter pairs are accepted. TGLPixelFormat.RGBA/TGLPixelDataType.UnsignedByte is always accepted, and the other acceptable pair can be discovered by calling GetColorReadFormat and GetColorReadType.

Note: values for pixels that lie outside the window connected to the current GL context are undefined.

Note: if an error is generated, no change is made to the contents of data.

Note: in DEBUG mode with assertions enabled, an error will be logged to the debug console if this framebuffer is not bound.

OpenGL API: glReadPixels

Parameters
ALeft
left window coordinate of the first pixel that is read from the framebuffer.
ABottom
bottom window coordinate of the first pixel that is read from the framebuffer.
AWidth
width of the rectangle in pixels.
AHeight
height of the rectangle in pixels.
AData
pointer to the pixel data to be filled.
AFormat
(optional) format of the pixels to return. Only Alpha, RGB and RGBA are supported. Defaults to RGBA.
ADataType
(optional) data type of the pixels to return. Defaults to UnsignedByte.
Exceptions raised
TGLError.InvalidEnum
if AFormat or ADataType is not an accepted value.
TGLError.InvalidValue
if either AWidth or AHeight is negative.
TGLError.InvalidOperation
if ADataType is UnsignedShort565 and AFormat is not RGB.
TGLError.InvalidOperation
if ADataType is UnsignedShort4444 or UnsignedShort5551 and AFormat is not RGBA.
TGLError.InvalidOperation
if AFormat and ADataType are neither RGBA UnsignedByte, respectively, nor the AFormat/ADataType pair returned by calling GetColorReadFormat and GetColorReadType.
TGLError.InvalidFramebufferOperation
if the framebuffer is not framebuffer complete.
See also
GetColorReadFormat
Get the format chosen by the implementation in which pixels may be read from the color buffer of the currently bound framebuffer in conjunction with GetColorReadType.
GetColorReadType
Get the type chosen by the implementation with which pixels may be read from the color buffer of the currently bound framebuffer in conjunction with GetColorReadFormat.
gl.PixelStore
Set pixel storage alignment.
gl.GetPixelStore
Returns to current pixel storage alignment.
Status
Return the framebuffer completeness status.
function GetRedBits: Integer; inline;

Get the number of red bitplanes in the color buffer of the framebuffer.

Note: in DEBUG mode with assertions enabled, an error will be logged to the debug console if this framebuffer is not bound.

OpenGL API: glGetIntegerv(GL_RED_BITS)

Returns

The number of red bitplanes.

See also
GetGreenBits
Get the number of green bitplanes in the color buffer of the framebuffer.
GetBlueBits
Get the number of blue bitplanes in the color buffer of the framebuffer.
GetAlphaBits
Get the number of alpha bitplanes in the color buffer of the framebuffer.
GetDepthBits
Get the number of bitplanes in the depth buffer of the framebuffer.
GetStencilBits
Get the number of bitplanes in the stencil buffer of the framebuffer.
function GetGreenBits: Integer; inline;

Get the number of green bitplanes in the color buffer of the framebuffer.

Note: in DEBUG mode with assertions enabled, an error will be logged to the debug console if this framebuffer is not bound.

OpenGL API: glGetIntegerv(GL_GREEN_BITS)

Returns

The number of green bitplanes.

See also
GetRedBits
Get the number of red bitplanes in the color buffer of the framebuffer.
GetBlueBits
Get the number of blue bitplanes in the color buffer of the framebuffer.
GetAlphaBits
Get the number of alpha bitplanes in the color buffer of the framebuffer.
GetDepthBits
Get the number of bitplanes in the depth buffer of the framebuffer.
GetStencilBits
Get the number of bitplanes in the stencil buffer of the framebuffer.
function GetBlueBits: Integer; inline;

Get the number of blue bitplanes in the color buffer of the framebuffer.

Note: in DEBUG mode with assertions enabled, an error will be logged to the debug console if this framebuffer is not bound.

OpenGL API: glGetIntegerv(GL_BLUE_BITS)

Returns

The number of blue bitplanes.

See also
GetGreenBits
Get the number of green bitplanes in the color buffer of the framebuffer.
GetRedBits
Get the number of red bitplanes in the color buffer of the framebuffer.
GetAlphaBits
Get the number of alpha bitplanes in the color buffer of the framebuffer.
GetDepthBits
Get the number of bitplanes in the depth buffer of the framebuffer.
GetStencilBits
Get the number of bitplanes in the stencil buffer of the framebuffer.
function GetAlphaBits: Integer; inline;

Get the number of alpha bitplanes in the color buffer of the framebuffer.

Note: in DEBUG mode with assertions enabled, an error will be logged to the debug console if this framebuffer is not bound.

OpenGL API: glGetIntegerv(GL_ALPHA_BITS)

Returns

The number of alpha bitplanes.

See also
GetGreenBits
Get the number of green bitplanes in the color buffer of the framebuffer.
GetBlueBits
Get the number of blue bitplanes in the color buffer of the framebuffer.
GetRedBits
Get the number of red bitplanes in the color buffer of the framebuffer.
GetDepthBits
Get the number of bitplanes in the depth buffer of the framebuffer.
GetStencilBits
Get the number of bitplanes in the stencil buffer of the framebuffer.
function GetDepthBits: Integer; inline;

Get the number of bitplanes in the depth buffer of the framebuffer.

Note: in DEBUG mode with assertions enabled, an error will be logged to the debug console if this framebuffer is not bound.

OpenGL API: glGetIntegerv(GL_DEPTH_BITS)

Returns

The number of bitplanes in the depth buffer.

See also
GetGreenBits
Get the number of green bitplanes in the color buffer of the framebuffer.
GetBlueBits
Get the number of blue bitplanes in the color buffer of the framebuffer.
GetAlphaBits
Get the number of alpha bitplanes in the color buffer of the framebuffer.
GetRedBits
Get the number of red bitplanes in the color buffer of the framebuffer.
GetStencilBits
Get the number of bitplanes in the stencil buffer of the framebuffer.
function GetStencilBits: Integer; inline;

Get the number of bitplanes in the stencil buffer of the framebuffer.

Note: in DEBUG mode with assertions enabled, an error will be logged to the debug console if this framebuffer is not bound.

OpenGL API: glGetIntegerv(GL_STENCIL_BITS)

Returns

The number of bitplanes in the stencil buffer.

See also
GetGreenBits
Get the number of green bitplanes in the color buffer of the framebuffer.
GetBlueBits
Get the number of blue bitplanes in the color buffer of the framebuffer.
GetAlphaBits
Get the number of alpha bitplanes in the color buffer of the framebuffer.
GetRedBits
Get the number of red bitplanes in the color buffer of the framebuffer.
GetRedBits
Get the number of red bitplanes in the color buffer of the framebuffer.
function GetSampleBuffers: Integer; inline;

Get the number of sample buffers associated with the framebuffer.

Note: in DEBUG mode with assertions enabled, an error will be logged to the debug console if this framebuffer is not bound.

OpenGL API: glGetIntegerv(GL_SAMPLE_BUFFERS)

See also
gl.SampleCoverage
Specify multisample coverage parameters.
function GetSamples: Integer; inline;

Get the coverage mask size of the framebuffer.

Note: in DEBUG mode with assertions enabled, an error will be logged to the debug console if this framebuffer is not bound.

OpenGL API: glGetIntegerv(GL_SAMPLES)

See also
gl.SampleCoverage
Specify multisample coverage parameters.
class function GetColorReadFormat: TGLPixelFormat; inline; static;

Get the format chosen by the implementation in which pixels may be read from the color buffer of the currently bound framebuffer in conjunction with GetColorReadType. In addition to this implementation-dependent format/type pair, format RGBA in conjunction with type UnsingedByte is always allowed by every implementation, regardless of the currently bound render surface.

Note: this is a global value that affects all framebuffers.

OpenGL API: glGetIntegerv(GL_IMPLEMENTATION_COLOR_READ_FORMAT)

See also
ReadPixels
Read a block of pixels from the frame buffer.
GetColorReadType
Get the type chosen by the implementation with which pixels may be read from the color buffer of the currently bound framebuffer in conjunction with GetColorReadFormat.
class function GetColorReadType: TGLPixelDataType; inline; static;

Get the type chosen by the implementation with which pixels may be read from the color buffer of the currently bound framebuffer in conjunction with GetColorReadFormat. In addition to this implementation-dependent format/type pair, format RGBA in conjunction with type UnsingedByte is always allowed by every implementation, regardless of the currently bound render surface.

Note: this is a global value that affects all framebuffers.

OpenGL API: glGetIntegerv(GL_IMPLEMENTATION_COLOR_READ_TYPE)

See also
ReadPixels
Read a block of pixels from the frame buffer.
GetColorReadFormat
Get the format chosen by the implementation in which pixels may be read from the color buffer of the currently bound framebuffer in conjunction with GetColorReadType.

Properties

property Handle: GLuint read FHandle;

OpenGL handle to the framebuffer object.


Generated by PasDocEx, based on PasDoc 0.14.0.