CAST II Game Engine |
||||||||
![]() |
MAIN | FEATURES | SCREENSHOTS | FORUMS | MANUAL | DOWNLOADS | CONTACTS | |
type TAPIStateWrapper = class
| Name | Description | |
|---|---|---|
![]() | Camera | Current camera (same as Renderer.LastAppliedCamera) |
![]() | ClipPlanesState | Clip planes state |
![]() | FPerfProfile | Performance profile |
![]() | FPixelShaders | ToFix: make it protected |
![]() | FRenderTargets | Render targets |
![]() | FVertexShaders | ToFix: make it protected |
![]() | LastError | Last renderer error. Used for pass validation. |
![]() | PixelShaderFlag | Pixel shader usage flag. Used internally. |
![]() | Renderer | Reference to renderer |
![]() | StageMatrixSet | True if texture matrix was set for a certain stage |
![]() | VertexShaderFlag | Vertex shader usage flag. Used internally. |
![]() | constructor Create; |
![]() | destructor Destroy; override; |
![]() | function APICreateRenderTarget(Index, Width, Height: Integer; AColorFormat, ADepthFormat: Cardinal): Boolean; virtual; abstract; |
![]() | procedure APISetShaderConstant(const Constant: TShaderConstant); overload; virtual; abstract; |
![]() | procedure APISetShaderConstant(ShaderKind: TShaderKind; ShaderRegister: Integer; const Vector: TShaderRegisterType); overload; virtual; abstract; |
![]() | function APIValidatePass(const Pass: TRenderPass; out ResultStr: string): Boolean; virtual; abstract; |
![]() | procedure ApplyClipPlanes; |
![]() | procedure ApplyCustomTextureMatrices(const Pass: TRenderPass; Item: TVisible); virtual; abstract; |
![]() | procedure ApplyPass(const Pass: TRenderPass); virtual; abstract; |
![]() | procedure ApplyTextureMatrices(const Pass: TRenderPass); virtual; abstract; |
![]() | function CreatePixelShader(Item: TShaderResource): Integer; virtual; |
![]() | function CreateRenderTarget(Index, Width, Height: Integer; AColorFormat, ADepthFormat: Cardinal; ADepthTexture: Boolean): Boolean; |
![]() | function CreateVertexShader(Item: TShaderResource; Declaration: TVertexDeclaration): Integer; virtual; |
![]() | procedure DestroyRenderTarget(Index: Integer); virtual; abstract; |
![]() | function FindRenderTarget(const ACamera: TCamera): Integer; |
![]() | procedure HandleDataChange(Data: Pointer); virtual; |
![]() | procedure HandleItemReplace(OldItem, NewItem: TItem); virtual; |
![]() | procedure HandleMessage(const Msg: TMessage); |
![]() | function IsRenderTargetEmpty(const Element: TRenderTarget): Boolean; |
![]() | function IsRenderTargetUptoDate(const ACamera: TCamera): Boolean; |
![]() | function IsShaderEmpty(const Element: TShader): Boolean; |
![]() | function ResolvePixelShader(Pass: TRenderPass): Boolean; |
![]() | function ResolveVertexShader(Pass: TRenderPass): Boolean; |
![]() | procedure SetBlending(Enabled: Boolean; SrcBlend, DestBlend, AlphaRef, ATestFunc, Operation: Integer); virtual; abstract; |
![]() | procedure SetClipPlane(Index: Cardinal; Plane: PPlane); virtual; abstract; |
![]() | procedure SetCullAndFillMode(FillMode, ShadeMode, CullMode: Integer; ColorMask: Cardinal); virtual; abstract; |
![]() | procedure SetEdgePoint(PointSprite, PointScale, EdgeAntialias: Boolean); virtual; abstract; |
![]() | procedure SetFog(Kind: Cardinal; Color: BaseTypes.TColor; AFogStart, AFogEnd, ADensity: Single); virtual; abstract; |
![]() | procedure SetLighting(Enable: Boolean; AAmbient: BaseTypes.TColor; SpecularMode: Integer; NormalizeNormals: Boolean); virtual; abstract; |
![]() | procedure SetLinePattern(ALinePattern: Longword); virtual; abstract; |
![]() | procedure SetMaterial(const AAmbient, ADiffuse, ASpecular, AEmissive: BaseTypes.TColor4S; APower: Single); virtual; abstract; |
![]() | procedure SetPointValues(APointSize, AMinPointSize, AMaxPointSize, APointScaleA, APointScaleB, APointScaleC: Single); virtual; abstract; |
![]() | function SetRenderTarget(const ACamera: TCamera; TextureTarget: Boolean): Boolean; virtual; abstract; |
![]() | procedure SetShaderConstant(ShaderKind: TShaderKind; ShaderRegister: Integer; const Vector: TShaderRegisterType); overload; |
![]() | procedure SetShaderConstant(const Constant: TShaderConstant); overload; |
![]() | procedure SetStencilState(SFailOp, ZFailOp, PassOp, STestFunc: Integer); virtual; abstract; |
![]() | procedure SetStencilValues(SRef, SMask, SWriteMask: Integer); virtual; abstract; |
![]() | procedure SetTextureFactor(ATextureFactor: BaseTypes.TColor); virtual; abstract; |
![]() | procedure SetTextureWrap(const CoordSet: TTWrapCoordSet); virtual; abstract; |
![]() | procedure SetZBuffer(ZTestFunc, ZBias: Integer; ZWrite: Boolean); virtual; abstract; |
![]() | function ValidatePass(const Pass: TRenderPass): Boolean; |
![]() | constructor Create; |
![]() | destructor Destroy; override; |
![]() | function APICreateRenderTarget(Index, Width, Height: Integer; AColorFormat, ADepthFormat: Cardinal): Boolean; virtual; abstract; |
Calls an API to create a render target with given parameters. DepthStencil surface will be created if ADepthFormat is other than pfUndefined. Returns True if success.
![]() | procedure APISetShaderConstant(const Constant: TShaderConstant); overload; virtual; abstract; |
Calls an API to set a shader constant
![]() | procedure APISetShaderConstant(ShaderKind: TShaderKind; ShaderRegister: Integer; const Vector: TShaderRegisterType); overload; virtual; abstract; |
Calls an API to set a shader constant. ShaderKind - kind of shader, ShaderRegister - index of 4-component vector register to set, Vector - new value of the register.
![]() | function APIValidatePass(const Pass: TRenderPass; out ResultStr: string): Boolean; virtual; abstract; |
Calls an API to validate the specified pass. Returns True if the pass is can be handled by current hardware. Otherwise returns False and fills ResultStr a text representation of the error occured.
![]() | procedure ApplyClipPlanes; |
Applies current clipping planes
![]() | procedure ApplyCustomTextureMatrices(const Pass: TRenderPass; Item: TVisible); virtual; abstract; |
Applies item-specific custom texture matrix of each texture stage of the specified render pass
![]() | procedure ApplyPass(const Pass: TRenderPass); virtual; abstract; |
Applies the specified render pass
![]() | procedure ApplyTextureMatrices(const Pass: TRenderPass); virtual; abstract; |
Applies texture matrix of each texture stage of the specified render pass
![]() | function CreatePixelShader(Item: TShaderResource): Integer; virtual; |
Creates a pixel shader from the resource
![]() | function CreateRenderTarget(Index, Width, Height: Integer; AColorFormat, ADepthFormat: Cardinal; ADepthTexture: Boolean): Boolean; |
Ensures that all parameters are correct and supported and calls APICreateRenderTarget. Returns True if a render target been created.
![]() | function CreateVertexShader(Item: TShaderResource; Declaration: TVertexDeclaration): Integer; virtual; |
Creates a vertex shader from the resource with the given vertex declaration
![]() | procedure DestroyRenderTarget(Index: Integer); virtual; abstract; |
Destroys the specified by index render target
![]() | function FindRenderTarget(const ACamera: TCamera): Integer; |
Return a render target for the given camera. If render target does not exists the function creates it.
![]() | procedure HandleDataChange(Data: Pointer); virtual; |
Handle data change of renderer-related items
![]() | procedure HandleItemReplace(OldItem, NewItem: TItem); virtual; |
Handle removal or replace of some item from scene
![]() | procedure HandleMessage(const Msg: TMessage); |
Handles some related messages
![]() | function IsRenderTargetEmpty(const Element: TRenderTarget): Boolean; |
Returns True if the specified render target is not initialized
![]() | function IsRenderTargetUptoDate(const ACamera: TCamera): Boolean; |
Returns True if there is no need to update render target texture associated with Camera
![]() | function IsShaderEmpty(const Element: TShader): Boolean; |
Returns True if the specified shader is not initialized
![]() | function ResolvePixelShader(Pass: TRenderPass): Boolean; |
Resolves a pixel shader for the given pass. Used internally.
![]() | function ResolveVertexShader(Pass: TRenderPass): Boolean; |
Resolves a vertex shader for the given pass. Used internally.
![]() | procedure SetBlending(Enabled: Boolean; SrcBlend, DestBlend, AlphaRef, ATestFunc, Operation: Integer); virtual; abstract; |
Sets alpha blending mode and alpha test settings
![]() | procedure SetClipPlane(Index: Cardinal; Plane: PPlane); virtual; abstract; |
Applies a clipping plane
![]() | procedure SetCullAndFillMode(FillMode, ShadeMode, CullMode: Integer; ColorMask: Cardinal); virtual; abstract; |
Sets culling, shading and filling modes as well as color write mask
![]() | procedure SetEdgePoint(PointSprite, PointScale, EdgeAntialias: Boolean); virtual; abstract; |
Sets edge and points settings
![]() | procedure SetFog(Kind: Cardinal; Color: BaseTypes.TColor; AFogStart, AFogEnd, ADensity: Single); virtual; abstract; |
Sets fog kind, color, start/end and density
![]() | procedure SetLighting(Enable: Boolean; AAmbient: BaseTypes.TColor; SpecularMode: Integer; NormalizeNormals: Boolean); virtual; abstract; |
Set lighting settings
![]() | procedure SetLinePattern(ALinePattern: Longword); virtual; abstract; |
Sets line pattern
![]() | procedure SetMaterial(const AAmbient, ADiffuse, ASpecular, AEmissive: BaseTypes.TColor4S; APower: Single); virtual; abstract; |
Sets API-level material (ambient, diffuse, specular and emissive colors and specular power)
![]() | procedure SetPointValues(APointSize, AMinPointSize, AMaxPointSize, APointScaleA, APointScaleB, APointScaleC: Single); virtual; abstract; |
Sets points size parameters
![]() | function SetRenderTarget(const ACamera: TCamera; TextureTarget: Boolean): Boolean; virtual; abstract; |
Sets current render target to the one associated with Camera. Returns True if actual change was made.
![]() | procedure SetShaderConstant(ShaderKind: TShaderKind; ShaderRegister: Integer; const Vector: TShaderRegisterType); overload; |
Sets a shader constant. ShaderKind - kind of shader, ShaderRegister - index of 4-component vector register to set, Vector - new value of the register.
![]() | procedure SetShaderConstant(const Constant: TShaderConstant); overload; |
Sets a shader constant
![]() | procedure SetStencilState(SFailOp, ZFailOp, PassOp, STestFunc: Integer); virtual; abstract; |
Sets stencil state
![]() | procedure SetStencilValues(SRef, SMask, SWriteMask: Integer); virtual; abstract; |
Sets stencil reference value and masks
![]() | procedure SetTextureFactor(ATextureFactor: BaseTypes.TColor); virtual; abstract; |
Sets texture factor color
![]() | procedure SetTextureWrap(const CoordSet: TTWrapCoordSet); virtual; abstract; |
Sets texture wrapping mode
![]() | procedure SetZBuffer(ZTestFunc, ZBias: Integer; ZWrite: Boolean); virtual; abstract; |
Sets Z-buffer related values
![]() | function ValidatePass(const Pass: TRenderPass): Boolean; |
Validate the specified pass. Returns True if the pass is valid
|
Last modified: Jan 6, 2010 |