record TGLRenderbuffer

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TGLRenderbuffer = record

Description

A renderbuffer. Serves as storage for a TGLFramebuffer.

Overview

Methods

procedure New; inline;
procedure Delete; inline;
procedure Bind; inline;
procedure Unbind; inline;
function IsBound: Boolean; inline;
procedure Storage(const AWidth, AHeight: Integer; const AFormat: TGLRenderbufferFormat = TGLRenderbufferFormat.RGBA4); inline;
function GetWidth: Integer; inline;
function GetHeight: Integer; inline;
function GetFormat: TGLRenderbufferFormat; inline;
function GetRedSize: Integer; inline;
function GetGreenSize: Integer; inline;
function GetBlueSize: Integer; inline;
function GetAlphaSize: Integer; inline;
function GetDepthSize: Integer; inline;
function GetStencilSize: Integer; inline;
class function GetCurrent: TGLRenderbuffer; inline; static;
class function GetMaxRenderbufferSize: Integer; inline; static;

Properties

property Handle: GLuint read FHandle;

Description

Methods

procedure New; inline;

Creates a renderbuffer.

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

OpenGL API: glGenRenderbuffers

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

Deletes the renderbuffer.

After a renderbuffer object is deleted, it has no contents, and its name is free for reuse (for example by New).

If a renderbuffer object that is currently bound is deleted, the binding reverts to 0 (the absence of any renderbuffer object). Additionally, special care must be taken when deleting a renderbuffer object if the image of the renderbuffer is attached to a framebuffer object. In this case, if the deleted renderbuffer object is attached to the currently bound framebuffer object, it is automatically detached. However, attachments to any other framebuffer objects are the responsibility of the application.

OpenGL API: glDeleteRenderbuffers

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

Binds the renderbuffer.

A renderbuffer is a data storage object containing a single image of a renderable internal format. A renderbuffer's image may be attached to a framebuffer object to use as a destination for rendering and as a source for reading.

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

The state of a renderbuffer object immediately after it is first bound is a zero-sized memory buffer with format RGBA4 and zero-sized red, green, blue, alpha, depth, and stencil pixel depths.

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

OpenGL API: glBindRenderbuffer

See also
New
Creates a renderbuffer.
Delete
Deletes the renderbuffer.
TGLFramebuffer.AttachRenderbuffer
Attach a renderbuffer to this framebuffer.
UnBind
Unbinds the renderbuffer.
IsBound
Checks if this renderbuffer is currently bound.
Storage
Create and initialize a renderbuffer object's data store.
procedure Unbind; inline;

Unbinds the renderbuffer.

OpenGL API: glBindRenderbuffer

See also
Bind
Binds the renderbuffer.
IsBound
Checks if this renderbuffer is currently bound.
function IsBound: Boolean; inline;

Checks if this renderbuffer is currently bound.

Returns

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

procedure Storage(const AWidth, AHeight: Integer; const AFormat: TGLRenderbufferFormat = TGLRenderbufferFormat.RGBA4); inline;

Create and initialize a renderbuffer object's data store.

This method establishes the data storage, format, and dimensions of a renderbuffer object's image. Any existing data store for the renderbuffer is deleted and the contents of the new data store are undefined.

An implementation may vary its allocation of internal component resolution based on any parameter, but the allocation and chosen internal format must not be a function of any other state and cannot be changed once they are established. The actual resolution in bits of each component of the allocated image can be queried with the Get* methods.

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

OpenGL API: glRenderbufferStorage

Parameters
AWidth
width of the renderbuffer in pixels
AHeight
height of the renderbuffer in pixels
AFormat
(optional) color-renderable, depth-renderable, or stencil- renderable format of the renderbuffer. Defaults to RGBA4.
Exceptions raised
TGLError.InvalidValue
if AWidth or AHeight is less than zero or greater than the maximum renderbuffer size (see GetMaxRenderbufferSize).
TGLError.OutOfMemory
if the implementation is unable to create a data store with the requested AWidth and AHeight.
TGLError.InvalidOperation
if no renderbuffer is bound.
See also
New
Creates a renderbuffer.
Delete
Deletes the renderbuffer.
Bind
Binds the renderbuffer.
TGLFramebuffer.AttachRenderbuffer
Attach a renderbuffer to this framebuffer.
GetMaxRenderbufferSize
Get the largest renderbuffer width and height that the GL can handle.
function GetWidth: Integer; inline;

Gets the width of the renderbuffer.

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

OpenGL API: glGetRenderbufferParameteriv(GL_RENDERBUFFER_WIDTH)

Returns

The width in pixels of the image of the renderbuffer.

See also
Bind
Binds the renderbuffer.
Storage
Create and initialize a renderbuffer object's data store.
GetHeight
Gets the height of the renderbuffer.
GetFormat
Gets the format of the renderbuffer.
GetRedSize
Gets the resolution in bits for the red component.
GetGreenSize
Gets the resolution in bits for the green component.
GetBlueSize
Gets the resolution in bits for the blue component.
GetAlphaSize
Gets the resolution in bits for the alpha component.
GetDepthSize
Gets the resolution in bits for the depth component.
GetStencilSize
Gets the resolution in bits for the stencil component.
function GetHeight: Integer; inline;

Gets the height of the renderbuffer.

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

OpenGL API: glGetRenderbufferParameteriv(GL_RENDERBUFFER_HEIGHT)

Returns

The height in pixels of the image of the renderbuffer.

See also
Bind
Binds the renderbuffer.
Storage
Create and initialize a renderbuffer object's data store.
GetWidth
Gets the width of the renderbuffer.
GetFormat
Gets the format of the renderbuffer.
GetRedSize
Gets the resolution in bits for the red component.
GetGreenSize
Gets the resolution in bits for the green component.
GetBlueSize
Gets the resolution in bits for the blue component.
GetAlphaSize
Gets the resolution in bits for the alpha component.
GetDepthSize
Gets the resolution in bits for the depth component.
GetStencilSize
Gets the resolution in bits for the stencil component.
function GetFormat: TGLRenderbufferFormat; inline;

Gets the format of the renderbuffer.

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

OpenGL API: glGetRenderbufferParameteriv(GL_RENDERBUFFER_INTERNAL_FORMAT)

Returns

The color-renderable, depth-renderable, or stencil-renderable format of the renderbuffer

See also
Bind
Binds the renderbuffer.
Storage
Create and initialize a renderbuffer object's data store.
GetWidth
Gets the width of the renderbuffer.
GetHeight
Gets the height of the renderbuffer.
GetRedSize
Gets the resolution in bits for the red component.
GetGreenSize
Gets the resolution in bits for the green component.
GetBlueSize
Gets the resolution in bits for the blue component.
GetAlphaSize
Gets the resolution in bits for the alpha component.
GetDepthSize
Gets the resolution in bits for the depth component.
GetStencilSize
Gets the resolution in bits for the stencil component.
function GetRedSize: Integer; inline;

Gets the resolution in bits for the red component.

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

OpenGL API: glGetRenderbufferParameteriv(GL_RENDERBUFFER_RED_SIZE)

Returns

The resolution in bits for the red component of the image of the renderbuffer.

See also
Bind
Binds the renderbuffer.
Storage
Create and initialize a renderbuffer object's data store.
GetWidth
Gets the width of the renderbuffer.
GetHeight
Gets the height of the renderbuffer.
GetFormat
Gets the format of the renderbuffer.
GetGreenSize
Gets the resolution in bits for the green component.
GetBlueSize
Gets the resolution in bits for the blue component.
GetAlphaSize
Gets the resolution in bits for the alpha component.
GetDepthSize
Gets the resolution in bits for the depth component.
GetStencilSize
Gets the resolution in bits for the stencil component.
function GetGreenSize: Integer; inline;

Gets the resolution in bits for the green component.

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

OpenGL API: glGetRenderbufferParameteriv(GL_RENDERBUFFER_GREEN_SIZE)

Returns

The resolution in bits for the green component of the image of the renderbuffer.

See also
Bind
Binds the renderbuffer.
Storage
Create and initialize a renderbuffer object's data store.
GetWidth
Gets the width of the renderbuffer.
GetHeight
Gets the height of the renderbuffer.
GetFormat
Gets the format of the renderbuffer.
GetRedSize
Gets the resolution in bits for the red component.
GetBlueSize
Gets the resolution in bits for the blue component.
GetAlphaSize
Gets the resolution in bits for the alpha component.
GetDepthSize
Gets the resolution in bits for the depth component.
GetStencilSize
Gets the resolution in bits for the stencil component.
function GetBlueSize: Integer; inline;

Gets the resolution in bits for the blue component.

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

OpenGL API: glGetRenderbufferParameteriv(GL_RENDERBUFFER_BLUE_SIZE)

Returns

The resolution in bits for the blue component of the image of the renderbuffer.

See also
Bind
Binds the renderbuffer.
Storage
Create and initialize a renderbuffer object's data store.
GetWidth
Gets the width of the renderbuffer.
GetHeight
Gets the height of the renderbuffer.
GetFormat
Gets the format of the renderbuffer.
GetGreenSize
Gets the resolution in bits for the green component.
GetRedSize
Gets the resolution in bits for the red component.
GetAlphaSize
Gets the resolution in bits for the alpha component.
GetDepthSize
Gets the resolution in bits for the depth component.
GetStencilSize
Gets the resolution in bits for the stencil component.
function GetAlphaSize: Integer; inline;

Gets the resolution in bits for the alpha component.

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

OpenGL API: glGetRenderbufferParameteriv(GL_RENDERBUFFER_ALPHA_SIZE)

Returns

The resolution in bits for the alpha component of the image of the renderbuffer.

See also
Bind
Binds the renderbuffer.
Storage
Create and initialize a renderbuffer object's data store.
GetWidth
Gets the width of the renderbuffer.
GetHeight
Gets the height of the renderbuffer.
GetFormat
Gets the format of the renderbuffer.
GetGreenSize
Gets the resolution in bits for the green component.
GetBlueSize
Gets the resolution in bits for the blue component.
GetRedSize
Gets the resolution in bits for the red component.
GetDepthSize
Gets the resolution in bits for the depth component.
GetStencilSize
Gets the resolution in bits for the stencil component.
function GetDepthSize: Integer; inline;

Gets the resolution in bits for the depth component.

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

OpenGL API: glGetRenderbufferParameteriv(GL_RENDERBUFFER_DEPTH_SIZE)

Returns

The resolution in bits for the depth component of the image of the renderbuffer.

See also
Bind
Binds the renderbuffer.
Storage
Create and initialize a renderbuffer object's data store.
GetWidth
Gets the width of the renderbuffer.
GetHeight
Gets the height of the renderbuffer.
GetFormat
Gets the format of the renderbuffer.
GetGreenSize
Gets the resolution in bits for the green component.
GetBlueSize
Gets the resolution in bits for the blue component.
GetAlphaSize
Gets the resolution in bits for the alpha component.
GetRedSize
Gets the resolution in bits for the red component.
GetStencilSize
Gets the resolution in bits for the stencil component.
function GetStencilSize: Integer; inline;

Gets the resolution in bits for the stencil component.

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

OpenGL API: glGetRenderbufferParameteriv(GL_RENDERBUFFER_STENCIL_SIZE)

Returns

The resolution in bits for the stencil component of the image of the renderbuffer.

See also
Bind
Binds the renderbuffer.
Storage
Create and initialize a renderbuffer object's data store.
GetWidth
Gets the width of the renderbuffer.
GetHeight
Gets the height of the renderbuffer.
GetFormat
Gets the format of the renderbuffer.
GetGreenSize
Gets the resolution in bits for the green component.
GetBlueSize
Gets the resolution in bits for the blue component.
GetAlphaSize
Gets the resolution in bits for the alpha component.
GetDepthSize
Gets the resolution in bits for the depth component.
GetRedSize
Gets the resolution in bits for the red component.
class function GetCurrent: TGLRenderbuffer; inline; static;

Get the renderbuffer that is currently bound.

OpenGL API: glGetProgramiv(GL_RENDERBUFFER_BINDING)

Returns

The currently bound renderbuffer. Its Handle will be 0 if there is no renderbuffer bound.

See also
Bind
Binds the renderbuffer.
Unbind
Unbinds the renderbuffer.
IsBound
Checks if this renderbuffer is currently bound.
class function GetMaxRenderbufferSize: Integer; inline; static;

Get the largest renderbuffer width and height that the GL can handle. The value must be at least 1.

OpenGL API: glGetIntegerv(GL_MAX_RENDERBUFFER_SIZE)

See also
Storage.
Create and initialize a renderbuffer object's data store.

Properties

property Handle: GLuint read FHandle;

OpenGL handle to the renderbuffer object.


Generated by PasDocEx, based on PasDoc 0.14.0.