CAST II Game Engine |
|||||||||||||||
![]() |
DESCRIPTION | ![]() |
FEATURES | ![]() |
SCREENSHOTS | ![]() |
FORUMS | ![]() |
DOCUMENTATION | ![]() |
DOWNLOADS | ![]() |
CONTACTS | ![]() |
|
type TRenderer = class(TSubsystem)
Contains API-independent routines and an interface fo API-dependent ones
| Name | Description | |
|---|---|---|
![]() | Active | Renderer performs rendering only if this variable is True. Active is set automatically in response on window minimization or switching to another application in fullscreen mode. |
![]() | APIBuffers | API-specific buffer management object |
![]() | APIState | Reference to API state wrapper object |
![]() | AppRequirements | Application requirements record. These values can be changed before renderer initialization to change its behaviour. |
![]() | BiasMat | Bias matrix used to remap texture coordinates for mirror and shadow map modes |
![]() | Buffers | API-independent buffer management object |
![]() | DebugMaterial | Material for debug rendering |
![]() | DebugTesselators | Tesselators for primitives used in debug rendering |
![]() | DesktopVideoMode | Current desktop video mde |
![]() | DisableTesselation | If set to True data existing in vertex/index buffers are always considered as valid and no tesselation will be performed |
![]() | FAdapterNames | Names of video adapters in system |
![]() | FCurrentAdapter | Current video adapter |
![]() | FCurrentVideoMode | Current video mode index in FVideoModes array |
![]() | FCurrentZBufferDepth | Current depth of Z-buffer |
![]() | FDebugOutput | Debug output state |
![]() | FFramesRendered | Number of frames rendered |
![]() | FFullScreen | Full screen mode state |
![]() | FLastAppliedCamera | Last applied camera |
![]() | FMainCamera | Top-level camera through which a scene is visible for user |
![]() | FNormalWindowStyle | Window style in not full-screen mode |
![]() | FPerfProfile | Performance profile |
![]() | FState | Current renderer state |
![]() | FTotalAdapters | Number of video adapters in system |
![]() | FTotalVideoModes | Number of video modes available |
![]() | FVideoModes | Video modes available |
![]() | FWindowedRect | Rendering area in windowed mode |
![]() | GammaRamp | Current gamma ramp |
![]() | HardwareClipping | True if even transformed vertices are clipped by hardware (DirectX only, seems incorrect) |
![]() | Manager | Reference to items manager |
![]() | MaxAPILights | Maximum number of light sources which may be simultaneously set through API |
![]() | MaxClipPlanes | Maximum number of user clipping planes |
![]() | MaxHardwareLights | Maximum number of light sources simultaneously handled by hardware T&L (fixed function pipeline only) |
![]() | MaxPointSize | Maximum point size |
![]() | MaxPrimitiveCount | Maximum number of primitives per single API call (DIP) |
![]() | MaxTextureHeight | Maximum supported texture height |
![]() | MaxTexturesPerPass | Maximum number of textures which may be used in a pass |
![]() | MaxTextureStages | Maximum number of texture stages which may be used in a pass |
![]() | MaxTextureWidth | Maximum supported texture width |
![]() | MaxVertexIndex | Maximum index value in index buffer |
![]() | MaxVertexShaderConsts | Max vertex shader constants |
![]() | PixelShaderVersionMajor | Major pixel shader version |
![]() | PixelShaderVersionMinor | Minor pixel shader version |
![]() | Power2Textures | True if only power of two-sized textures are supported |
![]() | RenderHeight | Current render window height |
![]() | RenderWidth | Current render window width |
![]() | RenderWindowHandle | Handle of render window |
![]() | SquareTextures | True if only square textures are supported |
![]() | TesselationParams | This record passed to tesselators buffer filling methods |
![]() | Textures | Textures |
![]() | VertexShaderVersionMajor | Major vertex shader version |
![]() | VertexShaderVersionMinor | Minor vertex shader version |
![]() | ViewPort | Current viewport |
![]() | WBuffering | True if w-buffering is supported |
![]() | constructor Create(AManager: TItemsManager); virtual; |
![]() | destructor Destroy; override; |
![]() | function APICheckFormat(const Format, Usage, RTFormat: Cardinal): Boolean; virtual; abstract; |
![]() | function APICreateDevice(WindowHandle, AVideoMode: Cardinal; AFullScreen: Boolean): Boolean; virtual; abstract; |
![]() | procedure APIPrepareFVFStates(Item: TVisible); virtual; abstract; |
![]() | procedure APIRenderIndexedStrip(Tesselator: TTesselator; StripIndex: Integer); virtual; abstract; |
![]() | procedure APIRenderStrip(Tesselator: TTesselator; StripIndex: Integer); virtual; abstract; |
![]() | function APIToPixelFormat(Format: Cardinal): Cardinal; |
![]() | procedure ApplyCamera(Camera: CAST2.TCamera); virtual; |
![]() | procedure ApplyLight(Index: Integer; const ALight: TLight); virtual; abstract; |
![]() | procedure BuildModeList; virtual; abstract; |
![]() | procedure CheckCaps; virtual; abstract; |
![]() | function CheckFormat(const Format, Usage, RTFormat: Cardinal; out NewFormat: Integer): Boolean; virtual; |
![]() | procedure CheckTextureFormats; virtual; abstract; |
![]() | procedure Clear(Flags: TClearFlagsSet; Color: BaseTypes.TColor; Z: Single; Stencil: Cardinal); virtual; abstract; |
![]() | function CreateDevice(WindowHandle, AVideoMode: Cardinal; AFullScreen: Boolean): Boolean; |
![]() | procedure FinishFrame; virtual; abstract; |
![]() | procedure HandleMessage(const Msg: TMessage); override; |
![]() | procedure InitDebugRender(ADebugMaterial: TMaterial); virtual; |
![]() | procedure InternalDeInit; virtual; |
![]() | function InternalGetIndexBufferIndex(Static: Boolean; BufferIndex: Integer): Integer; |
![]() | procedure InternalInit; |
![]() | function IsReady: Boolean; |
![]() | function PrepareWindow: Boolean; |
![]() | procedure ProjectToScreen(out Projected: TVector4s; const Vector: TVector3s); |
![]() | procedure RenderItem(Item: TVisible); |
![]() | procedure RenderItemBox(Item: CAST2.TProcessing; Color: BaseTypes.TColor); virtual; abstract; |
![]() | procedure RenderItemDebug(Item: CAST2.TProcessing); virtual; abstract; |
![]() | procedure RenderTesselator(Tesselator: TTesselator); |
![]() | function RestoreDevice(AVideoMode: Cardinal; AFullScreen: Boolean): Boolean; virtual; |
![]() | procedure SetFullScreen(const FScreen: Boolean); virtual; |
![]() | procedure SetGamma(Gamma, Contrast, Brightness: Single); virtual; |
![]() | procedure SetPerfProfile(APerfProfile: TPerfProfile); virtual; |
![]() | procedure SetVideoAdapter(Adapter: Cardinal); |
![]() | procedure SetViewPort(const X, Y, Width, Height: Integer; const MinZ, MaxZ: Single); virtual; |
![]() | procedure StartFrame; virtual; |
![]() | function ValidateMaterial(const Material: TMaterial): Boolean; |
![]() | constructor Create(AManager: TItemsManager); virtual; |
![]() | destructor Destroy; override; |
![]() | function APICheckFormat(const Format, Usage, RTFormat: Cardinal): Boolean; virtual; abstract; |
Returns True if a pixel format is available and can be used as a texture, render target or depth-stencil buffer. RTFormat is used only with depth-stencil usage to determine whether the supported depth-stencil format can be used with the given render target format.
![]() | function APICreateDevice(WindowHandle, AVideoMode: Cardinal; AFullScreen: Boolean): Boolean; virtual; abstract; |
Calls an API to initialize render device for rendering to the specified window or specified video mode
![]() | procedure APIPrepareFVFStates(Item: TVisible); virtual; abstract; |
Calls an API to set item's transformation, some FVF-related states
![]() | procedure APIRenderIndexedStrip(Tesselator: TTesselator; StripIndex: Integer); virtual; abstract; |
Performs necessary API calls to render a piece of indexed triangles
![]() | procedure APIRenderStrip(Tesselator: TTesselator; StripIndex: Integer); virtual; abstract; |
Performs necessary API calls to render a piece of triangles
![]() | function APIToPixelFormat(Format: Cardinal): Cardinal; |
Returns CAST pixel format from an API-specific one
![]() | procedure ApplyCamera(Camera: CAST2.TCamera); virtual; |
Applies render target settings, transformations, clear settings of the given camera to the renderer
![]() | procedure ApplyLight(Index: Integer; const ALight: TLight); virtual; abstract; |
Apply a light source with the specified index
![]() | procedure BuildModeList; virtual; abstract; |
Build available video modes list
![]() | procedure CheckCaps; virtual; abstract; |
Checks capabilities
![]() | function CheckFormat(const Format, Usage, RTFormat: Cardinal; out NewFormat: Integer): Boolean; virtual; |
Checks if the given pixel format is supported for the given usage. RTFormat is used only with depth-stencil usage to determine whether the supported depth-stencil format can be used with the given render target format. Returns False if the pixel format is unsupported. Also fills NewFormat with suggested substitue or with pfUndefined if no suitable substitution found.
![]() | procedure CheckTextureFormats; virtual; abstract; |
Checks available texture formats
![]() | procedure Clear(Flags: TClearFlagsSet; Color: BaseTypes.TColor; Z: Single; Stencil: Cardinal); virtual; abstract; |
Clear the specified parts of current render target with the specified values
![]() | function CreateDevice(WindowHandle, AVideoMode: Cardinal; AFullScreen: Boolean): Boolean; |
Initializes render device to render to the specified window or specified mode
![]() | procedure FinishFrame; virtual; abstract; |
Ends a rendering cycle
![]() | procedure HandleMessage(const Msg: TMessage); override; |
Default message handling
![]() | procedure InitDebugRender(ADebugMaterial: TMaterial); virtual; |
Initializes debug tesselators and material
![]() | procedure InternalDeInit; virtual; |
For internal use only
![]() | function InternalGetIndexBufferIndex(Static: Boolean; BufferIndex: Integer): Integer; |
For internal use only
![]() | procedure InternalInit; |
For internal use only
![]() | function IsReady: Boolean; |
Returns True if the renderer is ready to render
![]() | function PrepareWindow: Boolean; |
Prepares render window for windowed rendering
![]() | procedure ProjectToScreen(out Projected: TVector4s; const Vector: TVector3s); |
Projects Vector with MainCamera and returns the result in Projected
![]() | procedure RenderItem(Item: TVisible); |
Ensures that vertex/index buffers contains an up-to-date representation of the specified item, calls APIPrepareItem() and renders it's tesselator
![]() | procedure RenderItemBox(Item: CAST2.TProcessing; Color: BaseTypes.TColor); virtual; abstract; |
Renders item's bounding box
![]() | procedure RenderItemDebug(Item: CAST2.TProcessing); virtual; abstract; |
Renders item's debug information (currently colliding volumes if present)
![]() | procedure RenderTesselator(Tesselator: TTesselator); |
Renders the specified tesselator
![]() | function RestoreDevice(AVideoMode: Cardinal; AFullScreen: Boolean): Boolean; virtual; |
Restores render device with the specified video mode (if fullscreen)
![]() | procedure SetFullScreen(const FScreen: Boolean); virtual; |
Toggles fullscreen mode
![]() | procedure SetGamma(Gamma, Contrast, Brightness: Single); virtual; |
Adjusts gamma ramp
![]() | procedure SetPerfProfile(APerfProfile: TPerfProfile); virtual; |
Sets performance profile
![]() | procedure SetVideoAdapter(Adapter: Cardinal); |
Sets video adapter
![]() | procedure SetViewPort(const X, Y, Width, Height: Integer; const MinZ, MaxZ: Single); virtual; |
Sets render viewport
![]() | procedure StartFrame; virtual; |
Starts a rendering cycle
![]() | function ValidateMaterial(const Material: TMaterial): Boolean; |
Validates all techniques of the given material for current hardware configuration. Returns True if the set of available techniques changed during validation.
![]() | property AdapterName[Index: Cardinal]: string; |
![]() | property CurrentAdapter: Cardinal; |
![]() | property CurrentVideoMode: Cardinal; |
![]() | property CurrentZBufferDepth: Cardinal; |
![]() | property DebugOutput: Boolean; |
![]() | property FramesRendered: Integer; |
![]() | property FullScreen: Boolean; |
![]() | property LastAppliedCamera: CAST2; |
![]() | property MainCamera: CAST2; |
![]() | property State: TRendererState; |
![]() | property TotalAdapters: Cardinal; |
![]() | property TotalRenderTargets: Integer; |
![]() | property TotalVideoModes: Cardinal; |
![]() | property VideoMode[Index: Cardinal]: TVideoMode; |
![]() | property WindowedRect: TRect; |
![]() | property AdapterName[Index: Cardinal]: string; |
Names of video adapters in system by index
![]() | property CurrentAdapter: Cardinal; |
Current video adapter
![]() | property CurrentVideoMode: Cardinal; |
Current video mode index in FVideoModes array
![]() | property CurrentZBufferDepth: Cardinal; |
Current depth of Z-buffer
![]() | property DebugOutput: Boolean; |
Debug output state
![]() | property FramesRendered: Integer; |
Number of frames rendered
![]() | property FullScreen: Boolean; |
Full screen mode state
![]() | property LastAppliedCamera: CAST2; |
Currently applyed camera. May change during frame visulization (if render to texture used).
![]() | property MainCamera: CAST2; |
Camera through which a scene is rendered. Can't be changed during frame visulization.
![]() | property State: TRendererState; |
Current renderer state
![]() | property TotalAdapters: Cardinal; |
Number of video adapters in system
![]() | property TotalRenderTargets: Integer; |
Additional render targets currently allocated
![]() | property TotalVideoModes: Cardinal; |
Number of video modes available
![]() | property VideoMode[Index: Cardinal]: TVideoMode; |
Video modes available by index
![]() | property WindowedRect: TRect; |
Rendering area in windowed mode
|
Last modified: 4 Jul, 2008 |