Gorilla.Context.Buffers
Unit Gorilla.Context.Buffers.pasClasses
- TFBOTextureMap = class ( TObject )
- TFrameBufferObject = class ( TObject )
- TBufferObject = class ( TObject )
- TMeshBufferObject = class ( TObject )
Records
- record TFBOAttachedTexture
Enumerations
- enum TRenderTarget = ( Color_0, Depth, Stencil, Color_1, Color_2, Color_3, Color_4, Color_5, Color_6, Color_7, Color_8, Color_9, Color_10, Color_11, Color_12, Color_13, Color_14, Color_15 ) ;
- enum TBufferUsage = ( StreamDraw, StaticDraw, DynamicDraw ) ;
- enum TBufferBindingTarget = ( _Array, ElementArray, Uniform ) ;
- enum TBufferAccessMode = ( ReadOnly, WriteOnly, ReadWrite ) ;
- enum TMeshBufferComponent = ( Vertex, Normal, Color0, Color1, Color2, Color3, ColorF0, ColorF1, ColorF2, ColorF3, TexCoord0, TexCoord1, TexCoord2, TexCoord3, BiNormal, Tangent, All, Indices ) ;
Constants
Mics. types
- type TFBOTextureMapClass = class of TFBOTextureMap;
- type TFrameBufferObjectClass = class of TFrameBufferObject;
- type TBufferObjectClass = class of TBufferObject;
TFBOTextureMap
Ancestors
Members
Fields
Methods
- public procedure AddTexture ( const ATexture : TTexture; const ATarget : TRenderTarget ) ; virtual;
- public procedure RemoveTexture ( const ATarget : TRenderTarget ) ; abstract overload virtual;
- public procedure RemoveTexture ( ATexture : TTexture ) ; overload virtual;
- public function TextureExists ( const ATarget : TRenderTarget; ATexture : TTexture ) : Boolean ; virtual;
- public function GetTextureByTarget ( const ATarget : TRenderTarget ) : TTexture ; virtual;
- public procedure Clear ( ) ; virtual;
- public function Count ( ) : Integer ; virtual;
- public procedure RemoveAll ( ) ; virtual;
TFrameBufferObject
Ancestors
Members
Fields
- public FrameBufferObjectClass :
TFrameBufferObjectClass
- protected FHandle :
Cardinal
- protected FContext :
TContext3D
- protected FSize :
TSize
- protected FDepthBuf :
Cardinal
- protected FOwnsDepthBuf :
Boolean
- protected FStencilBuf :
Cardinal
- protected FRenderBuf :
Cardinal
- protected FOwnsRenderBuf :
Boolean
- protected FIsMultisampleBuffer :
Boolean
- protected FMSValue :
Integer
- protected FTextures :
TFBOTextureMap
Methods
- public constructor Create ( AContext : TContext3D; AIsMultisampleBuffer : Boolean = False ; AMultisample : TMultisample = None ) ;
- public destructor Destroy ( ) ;
- protected function IsValid
(
)
: Boolean
;
virtual;
Checks if the opengles frame buffer was created and the handle is != 0.
- protected function Check
(
)
: Boolean
;
abstract virtual;
Checks for errors inside of opengles.
- protected procedure DoCreateBuffer
(
)
;
abstract virtual;
Builds the real opengles frame buffer in the GPU.
- protected procedure DoDestroyBuffer
(
)
;
abstract virtual;
Destroys the real opengles frame buffer in GPU.
- public procedure Reset
(
)
;
abstract virtual;
Unattaches all attached textures and clears texture map.
- public procedure CheckMaxAttachments
(
const
ATarget :
TRenderTarget
)
;
abstract virtual;
Checks if your GPU supports the intended attachment buffer
- public procedure AttachTexture
(
const
AContext :
TContext3D; const
ATexture :
TTexture; const
ATarget :
TRenderTarget
)
;
abstract virtual;
Attaches a specific texture at a specific target in the frame buffer.
- public procedure DetachTexture
(
const
ATexture :
TTexture
)
;
virtual;
Detach a specific texture from frame buffer
- public function GetTextureByRenderTarget
(
const
ATarget :
TRenderTarget
)
: TTexture
;
virtual;
Returns an attached texture by supplied render target. If no texture was attached to this render target, the method returns nil.
- public procedure CreateRenderBuffer
(
AWidth :
Integer; AHeight :
Integer
)
;
abstract virtual;
Creates a new render buffer and attaches it to the specific frame buffer object.
- public procedure DestroyRenderBuffer
(
)
;
abstract virtual;
Destroys a created and attached render buffer from the specific frame buffer object.
- public procedure CreateDepthBuffer
(
AWidth :
Integer; AHeight :
Integer
)
;
abstract virtual;
Creates a new depth buffer and links it with this frame buffer object.
- public procedure DestroyDepthBuffer
(
)
;
abstract virtual;
Detaches and destroys the linked depth buffer.
- public procedure AttachDepthBuffer
(
ABufId :
Cardinal; ASize :
TPoint
)
;
abstract virtual;
Attaches an existing depth buffer by its handle and size.
- public procedure DetachDepthBuffer
(
)
;
virtual;
Detaches a previously attached depth buffer from this frame buffer object.
- public procedure Bind
(
AContext :
TContext3D
)
;
abstract virtual;
Binding the framebuffer and returning the previously binded framebuffer.
- public procedure Unbind
(
AContext :
TContext3D
)
;
abstract virtual;
Unbinding the framebuffer object to shader.
- public function RenderTargetToValue ( const ATarget : TRenderTarget ) : Cardinal ; class abstract virtual;
- public procedure Resize ( AWidth : Integer; AHeight : Integer ) ; abstract virtual;
- public procedure Prepare
(
const
ATargets :
TRenderTargets
)
;
abstract virtual;
Prepare color render targets for rendering process. Depth and stencil buffer will automatically be filtered.
- public procedure Clear
(
const
ATarget :
TRenderTarget; const
AColor :
TAlphaColorF; const
ADepth :
Single; const
AStencil :
Cardinal; const
AForceDraw :
Boolean
=
False
)
;
overload virtual;
Clearing a specific render target in framebuffer object.
- public procedure Clear
(
const
ATargets :
TRenderTargets; const
AColor :
TAlphaColorF; const
ADepth :
Single; const
AStencil :
Cardinal; const
AForceDraw :
Boolean
=
False
)
;
abstract overload virtual;
Clearing a number of render targets in framebuffer object.
Properties
TBufferObject
Ancestors
Members
Fields
- public BufferObjectClass :
TBufferObjectClass
- protected FHandle :
Cardinal
- protected FSize :
NativeInt
- protected FUsage :
TBufferUsage
- protected FTarget :
TBufferBindingTarget
- protected FBinded :
Boolean
- protected FBindingPoint :
Cardinal
- protected FBlockIndex :
Cardinal
- protected FLinked :
Boolean
Methods
- public constructor Create ( const AUsage : TBufferUsage; const ATarget : TBufferBindingTarget ) ;
- public destructor Destroy ( ) ;
- public function Bind ( ) : NativeInt ; abstract virtual;
- public procedure Unbind ( ) ; abstract virtual;
- public procedure Push ( const AData : Pointer; const ASize : NativeInt ) ; abstract virtual;
- public function SynchronizedMap ( const AMode : TBufferAccessMode ) : PPointer ; abstract virtual;
- public procedure SynchronizedUnmap ( ) ; abstract virtual;
- public procedure Clear ( ) ; abstract virtual;
- public procedure LinkWithBindingPoint ( const ABindingPoint : Cardinal; const AErrorCheck : Boolean ) ; abstract virtual;
- public procedure LinkWithShaderProgram ( const AProgram : TObject; const ABlockName : string; const AData : Pointer; const ASize : Cardinal; const AErrorCheck : Boolean ) ; abstract virtual;
- public procedure Unlink ( ) ; virtual;
Properties
TMeshBufferObject
The mesh buffer object represents is mainly used as frame inside an animation. It stores parts of the vertex-data (component). They are stored as BufferObjects or as compressed streams for better memory management
Ancestors
Members
Fields
- protected FKind :
TGorillaPrimitivesKind
- protected FLineWidth :
Single
- protected FComponents :
- protected FCompressed :
- protected FStaticBuffer :
TMeshBufferObject
- protected FTempMemStream :
TMemoryStream
Methods
- public constructor Create ( const AStaticBuffer : TMeshBufferObject ) ;
- public destructor Destroy ( ) ;
- protected function BuildBufferObject ( AIndex : TMeshBufferComponent ) : TBufferObject ;
- protected function GetComponent ( AIndex : TMeshBufferComponent ) : TBufferObject ;
- protected function GetIsCompressed ( AIndex : TMeshBufferComponent ) : Boolean ;
- protected function GetCompressed ( AIndex : TMeshBufferComponent ) : TStream ;
- protected procedure SetCompressed ( AIndex : TMeshBufferComponent; AValue : TStream ) ;
- public procedure AssignBufferObject ( ABuffer : TMeshBufferObject ) ;
- public procedure ClearAssignedBufferObject ( ) ;
- public procedure PushData ( const AIndex : TMeshBufferComponent; const AData : Pointer; const ASize : NativeInt ) ; overload;
- public procedure PushData ( const AIndex : TMeshBufferComponent; const ABuffer : TVertexBuffer ) ; overload;
- public function Decompress ( const AIndex : TMeshBufferComponent ) : TMemoryStream ;
- public function ComponentAvailable ( const AIndex : TMeshBufferComponent ) : Boolean ;
- public function BindStaticVertices
(
)
: NativeInt
;
bind the static mesh buffers
- public procedure UnbindStaticVertices ( ) ;
- public function BindStaticIndices ( ) : NativeInt ;
- public procedure UnbindStaticIndices ( ) ;
- public procedure ClearAll ( ) ;
- public function IsStaticBufferAvailable ( ) : Boolean ;