Gorilla.Material.Layered
Unit Gorilla.Material.Layered.pasClasses
- TGorillaLayeredMaterial = class ( TCustomMaterial )
- TGorillaLayeredMaterialItem = class ( TCollectionItem )
- TGorillaLayeredMaterialCollection = class ( TOwnedCollection )
- TGorillaLayeredMaterialSource = class ( TMaterialSource )
TGorillaLayeredMaterial
The default layered material which will render a black color for the complete buffer.
Ancestors
Members
Fields
Methods
- public constructor Create ( const ASource : TGorillaLayeredMaterialSource ) ;
- public destructor Destroy ( ) ;
- protected procedure DoApply ( const Context : TContext3D ) ; override;
- protected procedure DoInitialize ( ) ; override;
- public function GetMaterialsCount ( ) : Integer ; virtual;
- public function GetMaterialItem ( const AContext : TContext3D; const AIndex : Integer ) : TGorillaLayeredMaterialItem ; virtual;
Properties
TGorillaLayeredMaterialItem
A single sub material collection entry.
Ancestors
Members
Fields
Methods
- protected function GetDisplayName ( ) : string ; override;
- protected procedure SetDisplayName ( const AValue : string ) ; override;
- public procedure Assign ( Source : TPersistent ) ; override;
- public procedure Notification ( AComponent : TComponent; Operation : TOperation ) ;
Properties
TGorillaLayeredMaterialCollection
The material collections holds all renderable sub materials. All materials in this collection will be rendered in order!
Ancestors
Members
TGorillaLayeredMaterialSource
A LayeredMaterialSource is a container of multiple sub materials.
Remarks
It is important that those sub materials do not clear the context, otherwise it will produce unexpected behaviour. If the materials collection is empty, the renderer will render the complete buffer with black color. To add sub materials simply add those to the material collection: SubMaterialEntry := MyLayeredMaterialSource.Materials.Add(); SubMaterialEntry.Material := MySubMaterialSource;Ancestors
Members
Fields
Methods
- public constructor Create ( AOwner : TComponent ) ;
- public destructor Destroy ( ) ;
- protected procedure SetMaterials ( const AValue : TGorillaLayeredMaterialCollection ) ;
- protected function CreateMaterial ( ) : TMaterial ; override;
- protected procedure Notification ( AComponent : TComponent; Operation : TOperation ) ; override;
- public function AddLayer ( AName : string; AMaterial : TMaterialSource ) : TGorillaLayeredMaterialItem ;
Properties
- published Materials : TGorillaLayeredMaterialCollection
Returns the collection of material items with references to the stacked material sources.
read FMaterials
write SetMaterials