Gorilla.Material.Runtime
Unit Gorilla.Material.Runtime.pasClasses
- TGorillaRuntimeMaterial = class ( TCustomMaterial )
- TGorillaRuntimeMaterialSource = class ( TMaterialSource )
Constants
- const GORILLA_RUNTIMESHADER_VERSION : Comp = 1;
TGorillaRuntimeMaterial
Ancestors
Members
Fields
- private FSource :
TGorillaRuntimeMaterialSource
- private FCompiling :
Boolean
- private FErrorHandled :
Boolean
- protected FShaderName :
string
- protected FInputs :
TInputVariableList
- protected FTextures :
TTextureList
Methods
- public constructor Create ( ) ;
- public destructor Destroy ( ) ;
- protected function GetPropertyValue ( const AObject : TObject; APath : string; out AValue : TValue ) : Boolean ;
- protected procedure DoOnCompileError ( ASender : TObject; const AMessage : string ) ;
- protected procedure DoApply ( const Context : TContext3D ) ; override;
- protected procedure DoInitialize ( ) ; override;
- protected procedure DoReset ( const Context : TContext3D ) ; override;
- protected procedure DoOnTextureNotify ( ASender : TObject; const AItem : TTextureListEntry; AAction : TCollectionNotification ) ;
- protected procedure GetVariablesArray ( const AShaderKind : TContextShaderKind; out AVars : TContextShaderVariableDynArray ) ;
- public procedure LoadVertexShader ( const ACode : TArray<System.Byte> ) ;
- public procedure LoadPixelShader ( const ACode : TArray<System.Byte> ) ;
Properties
TGorillaRuntimeMaterialSource
Ancestors
Members
Fields
- protected FContextResetOvrId :
Integer
- protected FVertexShaderCode :
TStrings
- protected FPixelShaderCode :
TStrings
- protected FOnCompileError :
TOnShaderCompileError
Methods
- public constructor Create ( AOwner : TComponent ) ;
- public destructor Destroy ( ) ;
- protected function GetShaderName ( ) : string ;
- protected procedure SetShaderName ( const AValue : string ) ;
- protected function GetTextures ( ) : TTextureList ;
- protected function GetInput ( AIndex : string ) : TInputVariable ;
- protected procedure SetInput ( AIndex : string; const AValue : TInputVariable ) ;
- protected procedure SetVertexShaderCode ( AValue : TStrings ) ;
- protected procedure SetPixelShaderCode ( AValue : TStrings ) ;
- protected procedure ContextResetHandlerOverride ( const Sender : TObject; const Msg : TMessageBase ) ;
- protected procedure DoTexturesChanged ( ) ;
- protected function CreateMaterial ( ) : TMaterial ; override;
- public procedure Clear ( ) ;
- public function GetInputs ( ) : TInputVariableList ;
- public procedure AddInputVariable ( const AVar : TInputVariable ) ; overload;
- public procedure AddInputVariable ( AName : string; AKind : TContextShaderVariableKind; AIndex : Integer; ASize : Integer; AShaderKind : TContextShaderKind; ATextureUnit : Integer; AType : TInputVariableType; AValue : TValue ) ; overload;
- public procedure RemoveInputVariable ( AName : string ) ;
- public procedure AddTexture ( const ATex : TTextureListEntry ) ;
- public procedure RemoveTexture ( const AKey : string ) ;
- public procedure Compile ( ) ; virtual;
- public procedure LoadFromStream ( const AStream : TStream ) ;
- public procedure LoadFromFile ( const AFilename : string ) ;
- public procedure SaveToStream ( const AStream : TStream ) ;
- public procedure SaveToFile ( const AFilename : string ) ;
- public function ContextShaderVariableKindToString ( const AKind : TContextShaderVariableKind; const AValue : TValue ) : string ; class;
- public function StringToContextShaderVariableKind ( const AKind : TContextShaderVariableKind; const AValue : string ) : TValue ; class;
- public function ValidateContextShaderVariable ( const AKind : TContextShaderVariableKind; const AValue : TValue ) : TValue ; class;