| Description | Hierarchy | Fields | Methods | Properties |
type TMaterialRendererServices = class(TWrapper)
Interface providing some methods for changing advanced, internal states of a TVideoDriver.
![]() |
constructor Create(NRef: Pointer; NDriver: TReferenceCounted); |
![]() |
procedure SetBasicRenderStates(Material, LastMaterial: PMaterial; ResetAllRenderStates: Boolean); inline; |
![]() |
procedure SetPixelShaderConstant(StartRegister: LongInt; Data: PSingle; Registers: LongInt); overload; inline; |
![]() |
procedure SetPixelShaderConstant(const Name: AnsiString; Data: PSingle; Registers: LongInt); overload; inline; |
![]() |
procedure SetPixelShaderConstant(const Name: AnsiString; Data: array of Single); overload; |
![]() |
procedure SetPixelShaderConstant(StartRegister: LongInt; Data: array of Single); overload; |
![]() |
procedure SetVertexShaderConstant(const Name: AnsiString; Data: PSingle; Registers: LongInt); overload; inline; |
![]() |
procedure SetVertexShaderConstant(StartRegister: LongInt; Data: PSingle; Registers: LongInt); overload; inline; |
![]() |
procedure SetVertexShaderConstant(StartRegister: LongInt; Data: array of Single); overload; |
![]() |
procedure SetVertexShaderConstant(const Name: AnsiString; Data: array of Single); overload; |
![]() |
property VideoDriver: TReferenceCounted read FDriver; |
![]() |
constructor Create(NRef: Pointer; NDriver: TReferenceCounted); |
|
Constructor. Only used internally. | |
![]() |
procedure SetBasicRenderStates(Material, LastMaterial: PMaterial; ResetAllRenderStates: Boolean); inline; |
|
Can be called by an IMaterialRenderer to make its work easier. Parameters
| |
![]() |
procedure SetPixelShaderConstant(StartRegister: LongInt; Data: PSingle; Registers: LongInt); overload; inline; |
|
Sets a pixel shader constant. Parameters
| |
![]() |
procedure SetPixelShaderConstant(const Name: AnsiString; Data: PSingle; Registers: LongInt); overload; inline; |
|
Sets a constant by pointer for the pixel shader based on a name. Parameters
| |
![]() |
procedure SetPixelShaderConstant(const Name: AnsiString; Data: array of Single); overload; |
|
Sets a constant for the pixel shader based on a name. Parameters
| |
![]() |
procedure SetPixelShaderConstant(StartRegister: LongInt; Data: array of Single); overload; |
|
Sets a pixel shader constant. Parameters
| |
![]() |
procedure SetVertexShaderConstant(const Name: AnsiString; Data: PSingle; Registers: LongInt); overload; inline; |
|
Sets a constant by pointer for the vertex shader based on a name.
procedure HandleSetConstants(Services: TMaterialRendererServices; UserData: LongWord);
var Time: array[0..0] of Single;
WorldViewProj: TMatrix4;
begin
with Services do begin
Time[0] = TTimer.Time/100000;
SetVertexShaderConstant("fTime", Time);
WorldViewProj := VideoDriver.GetTransform(tsProjection) *
VideoDriver.GetTransform(tsView) *
VideoDriver.GetTransform(tsWorld);
SetVertexShaderConstant("mWorldViewProj", WorldViewProj);
end;
Parameters
| |
![]() |
procedure SetVertexShaderConstant(StartRegister: LongInt; Data: PSingle; Registers: LongInt); overload; inline; |
|
Sets a vertex shader constant by pointer. Parameters
| |
![]() |
procedure SetVertexShaderConstant(StartRegister: LongInt; Data: array of Single); overload; |
|
Sets a vertex shader constant. Parameters
| |
![]() |
procedure SetVertexShaderConstant(const Name: AnsiString; Data: array of Single); overload; |
|
Sets a constant for the vertex shader based on a name. | |
![]() |
property VideoDriver: TReferenceCounted read FDriver; |
|
The associated video driver. | |