Class TAPIBuffers
Unit
C2Render
Declaration
type TAPIBuffers = class
Description
API-specific vertex and index buffers management classFields
| | Name | Description |
 | Renderer | Reference to renderer object |
Methods
Overview
 | constructor Create(ARenderer: TRenderer); |
 | destructor Destroy; override; |
 | function AttachIndexBuffer(Index: Integer; StartingVertex: Integer): Boolean; virtual; abstract; |
 | function AttachVertexBuffer(Index, StreamIndex: Integer; VertexSize: Integer): Boolean; virtual; abstract; |
 | procedure Clear; virtual; abstract; |
 | function CreateIndexBuffer(Size: Integer; Static: Boolean): Integer; virtual; abstract; |
 | function CreateVertexBuffer(Size: Integer; Static: Boolean): Integer; virtual; abstract; |
 | function GetFVF(CastVertexFormat: Cardinal): Cardinal; virtual; abstract; |
 | function LockIndexBuffer(Index: Integer; Offset, Size: Integer; DiscardExisting: Boolean): Pointer; virtual; abstract; |
 | function LockVertexBuffer(Index: Integer; Offset, Size: Integer; DiscardExisting: Boolean): Pointer; virtual; abstract; |
 | function ResizeIndexBuffer(Index: Integer; NewSize: Integer): Boolean; virtual; abstract; |
 | function ResizeVertexBuffer(Index: Integer; NewSize: Integer): Boolean; virtual; abstract; |
 | procedure UnlockIndexBuffer(Index: Integer); virtual; abstract; |
 | procedure UnlockVertexBuffer(Index: Integer); virtual; abstract; |
Description
Attaches an index buffer and returns True if success. StartingVertex will be added to all indices read from the index buffer.
Attaches a vertex buffer to the specified data stream and returns True if success. VertexSize should match the size of the data in the buffer.
Frees all allocated buffers. All internal indices returned before this call become invalid.
Creates an index buffer with the given size in bytes and returns its internal index or -1 if creation fails If Static is False the buffer will be optimized to store dynamic data.
Creates a vertex buffer with the given size in bytes and returns its internal index or -1 if creation fails. If Static is False the buffer will be optimized to store dynamic geometry.
Returns a flexible vrtex format code from CAST vertex format
Locks the given range in a index buffer with the given index and returns a write-only pointer to the range data or nil if lock fails. If DiscardExisting is True existing data in the buffer will be discarded to avoid stalls.
Locks the given range in a vertex buffer with the given index and returns a write-only pointer to the range data or nil if lock fails. If DiscardExisting is True existing data in the buffer will be discarded to avoid stalls.
Changes size of the given index buffer to the given size and returns True if success
Changes size of the given vertex buffer to the given size and returns True if success
Unlocks a previously locked index buffer
Unlocks a previously locked vertex buffer
|
Last modified: 4 Jul, 2008
Copyright (C) 2006-2008, casteng.com
|