Class TVideoDriver

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TVideoDriver = class(TReferenceCounted)

Description

Interface to driver which is able to perform 2d and 3d graphics functions.
This interface is one of the most important interfaces of the Irrlicht Engine: All rendering and texture manipulation is done with this interface. You are able to use the Irrlicht Engine by only invoking methods of this interface if you like to, although the TSceneManager interface provides a lot of powerful classes and methods to make the programmer's life easier.

Hierarchy

Overview

Methods

Public constructor Create(Ref: Pointer);
Public function AddDynamicLight(const Light: TLight): LongInt; inline;
Public function AddMaterialRenderer(Renderer: TMaterialRenderer; const MName: AnsiString = ''): LongInt; inline;
Public function AddRenderTargetTexture(const Size: TSize; const MName: StringType = 'rt'; ColorFormat: TColorFormat = cfUnknown): TTexture; inline;
Public function AddTexture(const Size: TSize; const MName: StringType; Format: TColorFormat = cfA8R8G8B8): TTexture; overload; inline;
Public function AddTexture(const MName: StringType; Image: TImage; MipMapData: Pointer = nil): TTexture; overload; inline;
Public function BeginScene(BackBuffer: Boolean; ZBuffer: Boolean; BackgroundColor: TARGBColor): Boolean; overload; inline;
Public function BeginScene(BackBuffer: Boolean; ZBuffer: Boolean; BackgroundColor: TARGBColor; const ExposedVideoData: TExposedVideoData): Boolean; overload; inline;
Public function BeginScene(BackBuffer: Boolean; ZBuffer: Boolean; BackgroundColor: TARGBColor; const ExposedVideoData: TExposedVideoData; const SourceRect: TRect): Boolean; overload; inline;
Public function CreateAttributesFromMaterial(const Material: TMaterial): TAttributes; inline;
Public function CreateImage(ToCopy: TImage; const Pos: TPoint; const Size: TSize): TImage; overload; inline;
Public function CreateImage(Format: TColorFormat; const Size: TSize): TImage; overload; inline;
Public function CreateImage(Format: TColorFormat; ToCopy: TImage): TImage; overload; inline;
Public function CreateImage(Texture: TTexture; const Pos: TPoint; const Size: TSize): TImage; overload; inline;
Public function CreateImageFromData(Format: TColorFormat; const Size: TSize; Data: Pointer; OwnForeignMemory: Boolean = False; DeleteMemory: Boolean = True): TImage; inline;
Public function CreateImageFromFile(const FileName: StringType): TImage; overload; inline;
Public function CreateImageFromFile(RFile: TReadFile): TImage; overload; inline;
Public function CreateScreenShot: TImage; inline;
Public function EndScene: Boolean; inline;
Public function FindTexture(const FileName: StringType): TTexture; inline;
Public function GetDynamicLight(Index: LongWord): PLight; inline;
Public function GetFog: TFog; inline;
Public function GetGPUProgrammingServices: TGPUProgrammingServices; inline;
Public function GetImageLoader(Index: LongWord): TImageLoader; inline;
Public function GetImageWriter(Index: LongWord): TImageWriter; inline;
Public function GetMaterialRenderer(Index: LongWord): TMaterialRenderer; inline;
Public function GetMeshManipulator: TMeshManipulator; inline;
Public function GetPrimitiveCountDrawn(Mode: LongWord = 0): LongWord; inline;
Public function GetTexture(ReadFile: TReadFile): TTexture; overload; inline;
Public function GetTexture(const FileName: StringType): TTexture; overload; inline;
Public function GetTextureByIndex(Index: LongWord): TTexture; inline;
Public function GetTextureCreationFlag(Flag: TTextureCreationFlag): Boolean; inline;
Public function GetTransform(State: TTransformationState): TMatrix4; inline;
Public function QueryFeature(Feature: TVideoDriverFeature): Boolean; inline;
Public function SetClipPlane(Index: LongWord; const Plane: TPlane; Enable: Boolean = False): Boolean; inline;
Public function SetRenderTarget(Target: TRenderTarget; ClearTarget: Boolean = True; DoClearZBuffer: Boolean = True; Color: TARGBColor = 0): Boolean; inline;
Public function WriteImageToFile(Image: TImage; WFile: TWriteFile; Param: LongWord = 0): Boolean; overload; inline;
Public function WriteImageToFile(Image: TImage; const FileName: StringType; Param: LongWord = 0): Boolean; overload; inline;
Public procedure AddExternalImageLoader(Loader: TImageLoader); inline;
Public procedure AddExternalImageWriter(Writer: TImageWriter); inline;
Public procedure ClearZBuffer; inline;
Public procedure DeleteAllDynamicLights; inline;
Public procedure DisableFeature(Feature: TVideoDriverFeature ; Disable: Boolean = True); inline;
Public procedure Draw2DImage(Texture: TTexture; const DestPos: TPoint; const SourceRect, ClipRect: TRect; Color: TARGBColor = $ffffffff; UseAlphaChannel: Boolean = False); overload; inline;
Public procedure Draw2DImage(Texture: TTexture; const DestPos: TPoint; const SourceRect: TRect); overload; inline;
Public procedure Draw2DImage(Texture: TTexture; const DestRect, SourceRect, ClipRect: TRect; EdgeColors: array of TARGBColor; UseAlphaChannel: Boolean = False); overload;
Public procedure Draw2DImage(Texture: TTexture; const DestRect, SourceRect: TRect); overload; inline;
Public procedure Draw2DImage(Texture: TTexture; const DestPos: TPoint); overload; inline;
Public procedure Draw2DImageBatch(Texture: TTexture; const Positions: array of TPoint; const SourceRects: array of TRect); overload;
Public procedure Draw2DImageBatch(Texture: TTexture; const Positions: array of TPoint; const SourceRects: array of TRect; const ClipRect: TRect; Color: TARGBColor = $ffffffff; UseAlphaChannel: Boolean = False); overload;
Public procedure Draw2DLine(const PStart, PEnd: TPoint; Color: TARGBColor = $ffffffff); inline;
Public procedure Draw2DPolygon(const Center: TPoint; Radius: Single; Color: TARGBColor = $64ffffff; VertexCount: LongInt=10); inline;
Public procedure Draw2DRectangle(Color: TARGBColor; const Pos, Clip: TRect); overload; inline;
Public procedure Draw2DRectangle(Color: TARGBColor; const Pos: TRect); overload; inline;
Public procedure Draw2DRectangle(const Pos: TRect; LeftUp, RightUp, LeftDown, RightDown: TARGBColor; const ClipRect: TRect); overload; inline;
Public procedure Draw2DRectangle(const Pos: TRect; LeftUp, RightUp, LeftDown, RightDown: TARGBColor); overload; inline;
Public procedure Draw2DRectangleOutline(const Pos: TRect; Color: TARGBColor = $ffffffff); inline;
Public procedure Draw2DVertexPrimitiveList(Vertices: Pointer; VertexCount: LongWord; IndexList: Pointer; PrimCount: LongWord; VType: TVertexType = vtStandard; PType: TPrimitiveType = ptTriangles; IType: TIndexType = it16Bit); inline;
Public procedure Draw3DBox(const Box: TBoundingBox; Color: TARGBColor=$ffffffff); inline;
Public procedure Draw3DLine(const VStart, VEnd: TVector3D; Color: TARGBColor = $ffffffff); inline;
Public procedure Draw3DTriangle(const Triangle: TTriangle; Color: TARGBColor = $ffffffff); inline;
Public procedure DrawIndexedTriangleFan(Vertices: PVertex; VertexCount: LongWord; IndexList: PWord; TriangleCount: LongWord); overload; inline;
Public procedure DrawIndexedTriangleFan(Vertices: PVertex2TCoords; VertexCount: LongWord; IndexList: PWord; TriangleCount: LongWord); overload; inline;
Public procedure DrawIndexedTriangleFan(Vertices: PVertexTangents; VertexCount: LongWord; IndexList: PWord; TriangleCount: LongWord); overload; inline;
Public procedure DrawIndexedTriangleList(Vertices: PVertex2TCoords; VertexCount: LongWord; IndexList: PWord; TriangleCount: LongWord); overload; inline;
Public procedure DrawIndexedTriangleList(Vertices: PVertex; VertexCount: LongWord; IndexList: PWord; TriangleCount: LongWord); overload; inline;
Public procedure DrawIndexedTriangleList(Vertices: PVertexTangents; VertexCount: LongWord; IndexList: PWord; TriangleCount: LongWord); overload; inline;
Public procedure DrawMeshBuffer(Buffer: TMeshBuffer); inline;
Public procedure DrawPixel(X, Y: LongWord; Color: TARGBColor); inline;
Public procedure DrawStencilShadow(ClearStencilBuffer: Boolean = False; LeftUp: TARGBColor = $ff000000; RightUp: TARGBColor = $ff000000; LeftDown: TARGBColor = $ff000000; RightDown: TARGBColor = $ff000000); inline;
Public procedure DrawStencilShadowVolume(Triangles: PVector3D; Count: LongWord; ZFail: Boolean = True); inline;
Public procedure DrawVertexPrimitiveList(Vertices: Pointer; VertexCount: LongWord; IndexList: Pointer; PrimCount: LongWord; VType: TVertexType = vtStandard; PType: TPrimitiveType = ptTriangles; IType: TIndexType = it16Bit); inline;
Public procedure EnableClipPlane(Index: LongWord; Enable: Boolean=True); inline;
Public procedure EnableMaterial2D(Enable: Boolean = True); inline;
Public procedure FillMaterialStructureFromAttributes(out Material: TMaterial; Attributes: TAttributes); inline;
Public procedure MakeColorKeyTexture(Texture: TTexture; Color: TARGBColor; ZeroTexels: Boolean = False); overload; inline;
Public procedure MakeColorKeyTexture(Texture: TTexture; ColorKeyPixelPos: TPoint; ZeroTexels: Boolean = False); overload; inline;
Public procedure MakeNormalMapTexture(Texture: TTexture; Amplitude: Single = 1.0); inline;
Public procedure RemoveAllHardwareBuffers; inline;
Public procedure RemoveAllTextures; inline;
Public procedure RemoveTexture(Texture: TTexture); inline;
Public procedure RemvoveHardwareBuffer(Buffer: TMeshBuffer); inline;
Public procedure RenameTexture(Texture: TTexture; const NewName: StringType); inline;
Public procedure SetFog(const NFog: TFog); inline;
Public procedure SetMaterial(const Material: TMaterial); inline;
Public procedure SetMaterialRendererName(Index: LongInt; const RName: AnsiString); inline;
Public procedure SetTextureCreationFlag(Flag: TTextureCreationFlag; Enabled: Boolean = True); inline;
Public procedure SetTransform(State: TTransformationState; const Mat: TMatrix4); inline;
Public procedure TurnLightOn(LightIndex: LongInt; TurnOn: Boolean = True); inline;

Properties

Public property ColorFormat: TColorFormat read GetColorFormat;
Public property CurrentRenderTargetSize: TPoint read GetCurrentRenderTargetSize;
Public property DriverType: TVideoDriverType read FDriverType;
Public property ExposedVideoData: TExposedVideoData read GetExposedVideoData;
Public property FPS: LongInt read GetFPS;
Public property ImageLoaderCount: LongWord read GetImageLoaderCount;
Public property ImageWriterCount: LongWord read GetImageWriterCount;
Public property Material2D: PMaterial read GetMaterial2D;
Public property MaterialRendererCount: LongWord read GetMaterialRendererCount;
Public property MaxDynamicLightAmount: LongWord read GetMaximalDynamicLightAmount;
Public property MaxPrimitiveCount: LongWord read GetMaximalPrimitiveCount;
Public property MaxTextureSize: TSize read GetMaxTextureSize;
Public property MinHardwareBufferVertexCount: LongWord write SetMinHardwareBufferVertexCount;
Public property Name: StringType read GetName;
Public property OverrideMaterial: POverrideMaterial read GetOverrideMaterial;
Public property ScreenSize: TSize read GetScreenSize;
Public property TextureCount: LongWord read GetTextureCount;
Public property VendorInfo: AnsiString read GetVendorInfo;
Public property ViewPort: TRect read GetViewPort write SetViewPort;
Public property WasRecentlyReset: Boolean read CheckDriverReset;

Description

Methods

Public constructor Create(Ref: Pointer);

Constructor. Only used internally.

Public function AddDynamicLight(const Light: TLight): LongInt; inline;

Adds a dynamic light, returning an index to the light.

Parameters
Light
The light data used to create the light.
Returns

An index to the light, or -1 if an error occurs.

Public function AddMaterialRenderer(Renderer: TMaterialRenderer; const MName: AnsiString = ''): LongInt; inline;

Adds a new material renderer to the video device.

Parameters
Renderer
A pointer to the new renderer.
MName
Optional name for the material renderer entry.
Returns

The number of the material type which can be set in TMaterialType to use the renderer. -1 is returned if an error occured. For example if you tried to add an material renderer to the software renderer or the null device, which do not accept material renderers.

Public function AddRenderTargetTexture(const Size: TSize; const MName: StringType = 'rt'; ColorFormat: TColorFormat = cfUnknown): TTexture; inline;

Adds a new render target texture to the texture cache.

Parameters
Size
Size of the texture, in pixels. Width and height should be a power of two (e.g. 64, 128, 256, 512, ...) and it should not be bigger than the backbuffer, because it shares the zbuffer with the screen buffer.
MName
An optional name for the RTT.
ColorFormat
The color format of the render target. Floating point formats are supported.
Returns

The created texture or nil if the texture could not be created. This pointer should not be dropped. See TReferenceCounted::drop() for more information.

Public function AddTexture(const Size: TSize; const MName: StringType; Format: TColorFormat = cfA8R8G8B8): TTexture; overload; inline;

Creates an empty texture of specified size.

Parameters
Size
Size of the texture.
MName
A name for the texture. Later calls to GetTexture with this name will return this texture.
Format
Desired color format of the texture. Please note that the driver may choose to create the texture in another color format.
Returns

The newly created texture. This pointer should not be dropped. See TReferenceCounted.Drop for more information.

Public function AddTexture(const MName: StringType; Image: TImage; MipMapData: Pointer = nil): TTexture; overload; inline;

Creates a texture from an IImage.

Parameters
MName
A name for the texture. Later calls of GetTexture with this name will return this texture.
Image
Image the texture is created from.
MipMapData
Optional pointer to a set of images which build up the whole mipmap set. Must be images of the same color type as image. If this parameter is not given, the mipmaps are derived from image.
Returns

The newly created texture. This pointer should not be dropped. See TReferenceCounted.Drop for more information.

Public function BeginScene(BackBuffer: Boolean; ZBuffer: Boolean; BackgroundColor: TARGBColor): Boolean; overload; inline;

Applications must call this method before performing any rendering.
This method can clear the back- and the z-buffer.
Overloaded for default parameters.

Parameters
BackBuffer
Specifies if the back buffer should be cleared, which means that the screen is filled with the color specified. If this parameter is false, the back buffer will not be cleared and the color parameter is ignored.
ZBuffer
Specifies if the depth buffer (z buffer) should be cleared. It is not nesesarry to do so if only 2d drawing is used.
BackgroundColor
The color used for back buffer clearing.
Returns

Whether the operation was successful.

Public function BeginScene(BackBuffer: Boolean; ZBuffer: Boolean; BackgroundColor: TARGBColor; const ExposedVideoData: TExposedVideoData): Boolean; overload; inline;

Applications must call this method before performing any rendering.
This method can clear the back- and the z-buffer.
Overloaded for default parameters.

Parameters
BackBuffer
Specifies if the back buffer should be cleared, which means that the screen is filled with the color specified. If this parameter is false, the back buffer will not be cleared and the color parameter is ignored.
ZBuffer
Specifies if the depth buffer (z buffer) should be cleared. It is not nesesarry to do so if only 2d drawing is used.
BackgroundColor
The color used for back buffer clearing.
ExposedVideoData
Handle of another window, if you want the bitmap to be displayed on another window. If this is an empty element, everything will be displayed in the default window. Note: This feature is not fully implemented for all devices.
Returns

Whether the operation was successful.

Public function BeginScene(BackBuffer: Boolean; ZBuffer: Boolean; BackgroundColor: TARGBColor; const ExposedVideoData: TExposedVideoData; const SourceRect: TRect): Boolean; overload; inline;

Applications must call this method before performing any rendering.
This method can clear the back- and the z-buffer.

Parameters
BackBuffer
Specifies if the back buffer should be cleared, which means that the screen is filled with the color specified. If this parameter is false, the back buffer will not be cleared and the color parameter is ignored.
ZBuffer
Specifies if the depth buffer (z buffer) should be cleared. It is not nesesarry to do so if only 2d drawing is used.
BackgroundColor
The color used for back buffer clearing.
ExposedVideoData
Handle of another window, if you want the bitmap to be displayed on another window. If this is an empty element, everything will be displayed in the default window. Note: This feature is not fully implemented for all devices.
SourceRect
A rectangle defining the source rectangle of the area to be presented. Note: not implemented in all devices.
Returns

Whether the operation was successful.

Public function CreateAttributesFromMaterial(const Material: TMaterial): TAttributes; inline;

Creates material attributes list from a material.
This method is useful for serialization and more. Please note that the video driver will use the material renderer names from GetMaterialRendererName to write out the material type name, so they should be set before.

Parameters
Material
The material to serialize.
Returns

The TAttributes container holding the material properties.

Public function CreateImage(ToCopy: TImage; const Pos: TPoint; const Size: TSize): TImage; overload; inline;

Warning: this symbol is deprecated.

Creates a software image from a part of another image. Create an empty image and use CopyTo.

Parameters
ToCopy
Image to copy to the new image in part.
Pos
Position of rectangle to copy.
Size
Extents of rectangle to copy.
Returns

The created image. If you no longer need the image, you should call TImage.Drop. See TReferenceCounted.Drop for more information.

Public function CreateImage(Format: TColorFormat; const Size: TSize): TImage; overload; inline;

Creates an empty software image.

Parameters
Format
Desired color format of the image.
Size
Size of the image to create.
Returns

The created image. If you no longer need the image, you should call TImage.Drop. See TReferenceCounted.Drop for more information.

Public function CreateImage(Format: TColorFormat; ToCopy: TImage): TImage; overload; inline;

Warning: this symbol is deprecated.

Creates a software image by converting it to given format from another image. Create an empty image and use CopyTo.

Parameters
Fromat
Desired color format of the image.
ToCopy
Image to copy to the new image.
Returns

The created image. If you no longer need the image, you should call TImage.Drop. See TReferenceCounted.Drop for more information.

Public function CreateImage(Texture: TTexture; const Pos: TPoint; const Size: TSize): TImage; overload; inline;

Creates a software image from a part of a texture.

Parameters
Texture
Texture to copy to the new image in part.
Pos
Position of rectangle to copy.
Size
Extents of rectangle to copy.
Returns

The created image. If you no longer need the image, you should call TImage.Drop. See TReferenceCounted.Drop for more information.

Public function CreateImageFromData(Format: TColorFormat; const Size: TSize; Data: Pointer; OwnForeignMemory: Boolean = False; DeleteMemory: Boolean = True): TImage; inline;

Creates a software image from a byte array.
No hardware texture will be created for this image. This method is useful for example if you want to read a heightmap for a terrain renderer.

Parameters
Format
Desired color format of the texture
Size
Desired size of the image
Data
A byte array with pixel color information
OwnForeignMemory
If true, the image will use the data pointer directly and own it afterwards. If false, the memory will by copied internally.
DeleteMemory
Whether the memory is deallocated upon destruction.
Returns

The created image. If you no longer need the image, you should call TImage.Drop. See TReferenceCounted.Drop for more information.

Public function CreateImageFromFile(const FileName: StringType): TImage; overload; inline;

Creates a software image from a file.
No hardware texture will be created for this image. This method is useful for example if you want to read a heightmap for a terrain renderer.

Parameters
FileName
Name of the file from which the image is created.
Returns

The created image. If you no longer need the image, you should call TImage.Drop. See TReferenceCounted.Drop for more information.

Public function CreateImageFromFile(RFile: TReadFile): TImage; overload; inline;

Creates a software image from a file.
No hardware texture will be created for this image. This method is useful for example if you want to read a heightmap for a terrain renderer.

Parameters
RFile
File from which the image is created.
Returns

The created image. If you no longer need the image, you should call TImage.Drop. See TReferenceCounted.Drop for more information.

Public function CreateScreenShot: TImage; inline;

Creates a screenshot of the last rendered frame.

Public function EndScene: Boolean; inline;

Presents the rendered image to the screen.

Parameters
Applications
must call this method after performing any rendering.
Returns

False if failed and true if succeeded.

Public function FindTexture(const FileName: StringType): TTexture; inline;

Check if the image is already loaded.
Works similar to getTexture(), but does not load the texture if it is not currently loaded.

Parameters
FileName
Name of the texture.
Returns

The loaded texture, or nil if not found.

Public function GetDynamicLight(Index: LongWord): PLight; inline;

Returns light data which was previously set by IVideoDriver::addDynamicLight().

Parameters
Index
Zero based index of the light. Must be 0 or greater and smaller than TVideoDriver.DynamicLightCount.
Returns

A pointer to the light data.

Public function GetFog: TFog; inline;
 
Public function GetGPUProgrammingServices: TGPUProgrammingServices; inline;

Gets the IGPUProgrammingServices interface.

Returns

The IGPUProgrammingServices. Returns nilif the video driver does not support this. For example the Software driver and the Null driver will always return nil.

Public function GetImageLoader(Index: LongWord): TImageLoader; inline;

Retrieve the given image loader.

Parameters
Index
The index of the loader to retrieve. This parameter is an 0-based array index.
Returns

The specified loader, or nil if there is no loader with that index.

Public function GetImageWriter(Index: LongWord): TImageWriter; inline;

Retrieve the given image writer.

Parameters
Index
The index of the writer to retrieve. This parameter is an 0-based array index.
Returns

The specified writer, or nil if there is no writer with that index.

Public function GetMaterialRenderer(Index: LongWord): TMaterialRenderer; inline;

Get access to a material renderer by index. value which was returned by AddMaterialRenderer.

Parameters
Index
Id of the material renderer. Can be a value of the TMaterialType enum or a
Returns

The Material renderer or nil if not existing.

Public function GetMeshManipulator: TMeshManipulator; inline;

Returns the mesh manipulator.

Public function GetPrimitiveCountDrawn(Mode: LongWord = 0): LongWord; inline;

Returns amount of primitives (mostly triangles) which were drawn in the last frame. Like the FPS property, this method provides statistical information.

Parameters
Mode
Defines if the primitives drawn are accumulated or counted per frame.
Returns

Number of primitives drawn in the last frame.

Public function GetTexture(ReadFile: TReadFile): TTexture; overload; inline;

Get access to a named texture.
Loads the texture from disk if it is not already loaded and generates mipmap levels if desired. Texture loading can be influenced using the SetTextureCreationFlag() method. The texture can be in several imageformats, such as BMP, JPG, TGA, PCX, PNG, and PSD.

Parameters
ReadFile
Pointer to an already opened file.
Returns

The texture, or nil if the texture could not be loaded. This pointer should not be dropped. See TReferenceCounted.Drop for more information.

Public function GetTexture(const FileName: StringType): TTexture; overload; inline;

Get access to a named texture.
Loads the texture from disk if it is not already loaded and generates mipmap levels if desired. Texture loading can be influenced using the SetTextureCreationFlag() method. The texture can be in several imageformats, such as BMP, JPG, TGA, PCX, PNG, and PSD.

Parameters
FileName
Filename of the texture to be loaded.
Returns

The texture, or nil if the texture could not be loaded. This pointer should not be dropped. See TReferenceCounted.Drop for more information.

Public function GetTextureByIndex(Index: LongWord): TTexture; inline;

Returns a texture by index. this index might change when adding or removing textures.

Parameters
Index
Index of the texture, must be smaller than TextureCount. Please note that
Returns

The texture, or nil if the texture was not set or index is out of bounds. This pointer should not be dropped. See TReferenceCounted.Drop for more information.

Public function GetTextureCreationFlag(Flag: TTextureCreationFlag): Boolean; inline;

Returns if a texture creation flag is enabled or disabled.
You can change this value using SetTextureCreationMode.

Parameters
Flag
Texture creation flag.
Returns

The current texture creation mode.

Public function GetTransform(State: TTransformationState): TMatrix4; inline;

Returns the transformation set by setTransform.

Parameters
State
Transformation type to query
Returns

Matrix describing the transformation.

Public function QueryFeature(Feature: TVideoDriverFeature): Boolean; inline;

Returns whether a given feature is available in the driver.

Parameters
Feature
The feature to test for.
Returns

Whether this feature is available.

Public function SetClipPlane(Index: LongWord; const Plane: TPlane; Enable: Boolean = False): Boolean; inline;

Set or unset a clipping plane.
There are at least 6 clipping planes available for the user to set at will.

Parameters
Index
The plane index. Must be between 0 and MaxUserClipPlanes.
Plane
The plane itself.
Enable
If true, enable the clipping plane else disable it.
Returns

True if the clipping plane is usable.

Public function SetRenderTarget(Target: TRenderTarget; ClearTarget: Boolean = True; DoClearZBuffer: Boolean = True; Color: TARGBColor = 0): Boolean; inline;

Sets or resets special render targets.
This method enables access to special color buffers such as stereoscopic buffers or auxiliary buffers.

Parameters
Target
Enum value for the render target
ClearTarget
Clears the target buffer with the color parameter
ClearZBuffer
Clears the zBuffer of the rendertarget. Note that because the main frame buffer may share the zbuffer with the render target, its zbuffer might be partially cleared too by this.
Color
The background color for the render target.
Returns

True if sucessful and false if not.

Public function WriteImageToFile(Image: TImage; WFile: TWriteFile; Param: LongWord = 0): Boolean; overload; inline;

Writes the provided image to a file.
Requires that there is a suitable image writer registered for writing the image.

Parameters
Image
Image to write.
WFile
An already open TWriteFile object. The name will be used to determine the appropriate image writer to use.
Param
Control parameter for the backend (e.g. compression level).
Returns

True on success.

Public function WriteImageToFile(Image: TImage; const FileName: StringType; Param: LongWord = 0): Boolean; overload; inline;

Writes the provided image to a file.
Requires that there is a suitable image writer registered for writing the image.

Parameters
Image
Image to write.
The
file name.
Param
Control parameter for the backend (e.g. compression level).
Returns

True on success.

Public procedure AddExternalImageLoader(Loader: TImageLoader); inline;

Adds an external image loader to the engine.
This is useful if the Irrlicht Engine should be able to load textures of currently unsupported file formats (e.g. gif). The TImageLoader only needs to be implemented for loading this file format. A pointer to the implementation can be passed to the engine using this method.

Parameters
Loader
The external loader.
Public procedure AddExternalImageWriter(Writer: TImageWriter); inline;

Adds an external image writer to the engine.
This is useful if the Irrlicht Engine should be able to write textures of currently unsupported file formats (e.g .gif). The TImageWriter only needs to be implemented for writing this file format. A pointer to the implementation can be passed to the engine using this method.

Parameters
Writer
The external image writer.
Public procedure ClearZBuffer; inline;

Clears the ZBuffer.
Note that you usually need not to call this method, as it is automatically done in TVideoDriver.BeginScene or TVideoDriver.SetRenderTarget if you enable ZBuffer. But if you have to render some special things, you can clear the zbuffer during the rendering process with this method any time.

Public procedure DeleteAllDynamicLights; inline;

Deletes all dynamic lights which were previously added with AddDynamicLight.

Public procedure DisableFeature(Feature: TVideoDriverFeature ; Disable: Boolean = True); inline;

Disable a feature of the driver. Can also be used to enable the features again. It is not possible to enable unsupported features this way, though.

Parameters
Feature
Feature to disable.
Disable
When true the feature is disabled, otherwise it is enabled.
Public procedure Draw2DImage(Texture: TTexture; const DestPos: TPoint; const SourceRect, ClipRect: TRect; Color: TARGBColor = $ffffffff; UseAlphaChannel: Boolean = False); overload; inline;

Draws a part of the texture into the rectangle. Note that colors must be an array of 4 colors if used.

Parameters
Texture
The texture to draw from
DestRect
The rectangle to draw into
SourceRect
The rectangle denoting a part of the texture
ClipRect
Clips the destination rectangle.
Color
Color with which the image is drawn. Note that the alpha component is used. If alpha is other than 255, the image will be transparent.
UseAlphaChannel
True if alpha channel will be blended.
Public procedure Draw2DImage(Texture: TTexture; const DestPos: TPoint; const SourceRect: TRect); overload; inline;

Draws a part of the texture into the rectangle. Note that colors must be an array of 4 colors if used.
Overloaded for default parameters.

Parameters
Texture
The texture to draw from
DestRect
The rectangle to draw into
SourceRect
The rectangle denoting a part of the texture.
Public procedure Draw2DImage(Texture: TTexture; const DestRect, SourceRect, ClipRect: TRect; EdgeColors: array of TARGBColor; UseAlphaChannel: Boolean = False); overload;

Draws a part of the texture into the rectangle. Note that colors must be an array of 4 colors if used.

Parameters
Texture
The texture to draw from
DestRect
The rectangle to draw into
SourceRect
The rectangle denoting a part of the texture
ClipRect
Clips the destination rectangle.
EdgeColors
Array of 4 colors denoting the color values of the corners of the DestRect.
UseAlphaChannel
True if alpha channel will be blended.
Public procedure Draw2DImage(Texture: TTexture; const DestRect, SourceRect: TRect); overload; inline;

Draws a part of the texture into the rectangle. Note that colors must be an array of 4 colors if used.
Overloaded for default parameters.

Parameters
Texture
The texture to draw from
DestRect
The rectangle to draw into
SourceRect
The rectangle denoting a part of the texture.
Public procedure Draw2DImage(Texture: TTexture; const DestPos: TPoint); overload; inline;

Draws a part of the texture into the rectangle. Note that colors must be an array of 4 colors if used.

Parameters
Texture
The texture to draw from
DestPos
Upper left 2d destination position where the image will be drawn.
Public procedure Draw2DImageBatch(Texture: TTexture; const Positions: array of TPoint; const SourceRects: array of TRect); overload;

Draws a set of 2d images, using a color and the alpha channel of the texture.
The images are drawn beginning at pos and concatenated in one line. All drawings are clipped against clipRect (if != 0). The subtextures are defined by the array of sourceRects and are chosen by the indices given.
Overloaded for default parameters.

Parameters
Texture
Texture to be drawn.
Pos
Upper left 2d destination position where the image will be drawn.
SourceRects
Source rectangles of the image.
Public procedure Draw2DImageBatch(Texture: TTexture; const Positions: array of TPoint; const SourceRects: array of TRect; const ClipRect: TRect; Color: TARGBColor = $ffffffff; UseAlphaChannel: Boolean = False); overload;

Draws a set of 2d images, using a color and the alpha channel of the texture.
The images are drawn beginning at pos and concatenated in one line. All drawings are clipped against clipRect (if != 0). The subtextures are defined by the array of sourceRects and are chosen by the indices given.

Parameters
Texture
Texture to be drawn.
Pos
Upper left 2d destination position where the image will be drawn.
SourceRects
Source rectangles of the image.
Indices
List of indices which choose the actual rectangle used each time.
KerningWidth
Offset to Position on X
ClipRect
Pointer to rectangle on the screen where the image is clipped to.
Color
Color with which the image is drawn. Note that the alpha component is used. If alpha is other than 255, the image will be transparent.
UseAlphaChannel
If true, the alpha channel of the texture is used to draw the image.
Public procedure Draw2DLine(const PStart, PEnd: TPoint; Color: TARGBColor = $ffffffff); inline;

Draws a 2d line.

Parameters
PStart
Screen coordinates of the start of the line in pixels.
PEnd
Screen coordinates of the start of the line in pixels.
Color
Color of the line to draw.
Public procedure Draw2DPolygon(const Center: TPoint; Radius: Single; Color: TARGBColor = $64ffffff; VertexCount: LongInt=10); inline;

Draws a non filled concyclic regular 2d polyon.
This method can be used to draw circles, but also triangles, tetragons, pentagons, hexagons, heptagons, octagons, enneagons, decagons, hendecagons, dodecagon, triskaidecagons, etc. I think you'll got it now. And all this by simply specifying the vertex count. Welcome to the wonders of geometry.

Parameters
Center
Position of center of circle (pixels).
Radius
Radius of circle in pixels.
Color
Color of the circle.
VertexCount
Amount of vertices of the polygon. Specify 2 to draw a line, 3 to draw a triangle, 4 for tetragons and a lot (>10) for nearly a circle.
Public procedure Draw2DRectangle(Color: TARGBColor; const Pos, Clip: TRect); overload; inline;

Draws a 2d rectangle.

Parameters
Color
Color of the rectangle to draw. The alpha component will not be ignored and specifies how transparent the rectangle will be.
Pos
Position of the rectangle.
Clip
Pointer to rectangle against which the rectangle will be clipped.
Public procedure Draw2DRectangle(Color: TARGBColor; const Pos: TRect); overload; inline;

Draws a 2d rectangle.
Overloaded for default parameters.

Parameters
Color
Color of the rectangle to draw. The alpha component will not be ignored and specifies how transparent the rectangle will be.
Pos
Position of the rectangle.
Clip
Pointer to rectangle against which the rectangle will be clipped.
Public procedure Draw2DRectangle(const Pos: TRect; LeftUp, RightUp, LeftDown, RightDown: TARGBColor; const ClipRect: TRect); overload; inline;

Draws a 2d rectangle with a gradient.
The colors' alpha components will not be ignored, but specify the rectangle's transparency.

Parameters
Pos
Position of the rectangle.
LeftUp
Color of the upper left corner to draw.
RightUp
Color of the upper right corner to draw.
LeftDown
Color of the lower left corner to draw.
RightDown
Color of the lower right corner to draw.
ClipRect
Rectangle against which the rectangle will be clipped.
Public procedure Draw2DRectangle(const Pos: TRect; LeftUp, RightUp, LeftDown, RightDown: TARGBColor); overload; inline;

Draws a 2d rectangle with a gradient.
The colors' alpha components will not be ignored, but specify the rectangle's transparency.
Overloaded for default parameters.

Parameters
Pos
Position of the rectangle.
LeftUp
Color of the upper left corner to draw.
RightUp
Color of the upper right corner to draw.
LeftDown
Color of the lower left corner to draw.
RightDown
Color of the lower right corner to draw.
ClipRect
Rectangle against which the rectangle will be clipped.
Public procedure Draw2DRectangleOutline(const Pos: TRect; Color: TARGBColor = $ffffffff); inline;

Draws a 2d rectangle.

Parameters
Color
Color of the rectangle to draw. The alpha component will not be ignored and specifies how transparent the rectangle will be.
Pos
Position of the rectangle.
Clip
Pointer to rectangle against which the rectangle will be clipped.
Public procedure Draw2DVertexPrimitiveList(Vertices: Pointer; VertexCount: LongWord; IndexList: Pointer; PrimCount: LongWord; VType: TVertexType = vtStandard; PType: TPrimitiveType = ptTriangles; IType: TIndexType = it16Bit); inline;


Draws a vertex primitive list in 2d.
Compared to the general (3d) version of this method, this one sets up a 2d render mode, and uses only x and y of vectors. Note that, depending on the index type, some vertices might be not accessible through the index list. The limit is at 65535 vertices for 16bit indices. Please note that currently not all primitives are available for all drivers, and some might be emulated via triangle renders. This function is not available for the sw drivers.

Parameters
Vertices
Pointer to array of vertices.
VertexCount
Amount of vertices in the array.
IndexList
Pointer to array of indices. These define the vertices used for each primitive. Depending on the PType, indices are interpreted as single objects (for point like primitives), pairs (for lines), triplets (for triangles), or quads.
PrimCount
Amount of Primitives
VType
Vertex type, e.g. vtStandard for S3DVertex.
PType
Primitive type, e.g. ptTriangleFan for a triangle fan.
IType
Index type, e.g. it16Bit for 16bit indices.
Public procedure Draw3DBox(const Box: TBoundingBox; Color: TARGBColor=$ffffffff); inline;

Draws a 3d axis aligned box.
This method simply calls Draw3DLine for the edges of the box. Note that the box is drawn using the current transformation matrix and material. So if you need to draw it independently of the current transformation, use

    VideoDriver.SetMaterial(someMaterial);
    VideoDriver.SetTransform(tsWorld, identityMatrix);
            

for some properly set up material before drawing the box.

Parameters
Box
The axis aligned box to draw
Color
Color to use while drawing the box.
Public procedure Draw3DLine(const VStart, VEnd: TVector3D; Color: TARGBColor = $ffffffff); inline;

Draws a 3d line.
For some implementations, this method simply calls DrawVertexPrimitiveList for some triangles. Note that the line is drawn using the current transformation matrix and material. So if you need to draw the 3D line independently of the current transformation, use

    VideoDriver.SetMaterial(someMaterial);
    VideoDriver.SetTransform(tsWorld, identityMatrix);
            

for some properly set up material before drawing the box. Some drivers support line thickness set in the material.

Parameters
VStart
Start of the 3D line.
VEnd
End of the 3D Line.
Color
Color.
Public procedure Draw3DTriangle(const Triangle: TTriangle; Color: TARGBColor = $ffffffff); inline;

Draws a 3d triangle.
This method calls DrawVertexPrimitiveList for some triangles. This method works with all drivers because it simply calls drawVertexPrimitiveList, but it is hence not very fast. Note that the triangle is drawn using the current transformation matrix and material. So if you need to draw it independently of the current transformation, use

    VideoDriver.SetMaterial(someMaterial);
    VideoDriver.SetTransform(tsWorld, identityMatrix);
            

for some properly set up material before drawing the triangle.

Parameters
Triangle
The triangle to draw.
Color
Color of the Triangle.
Public procedure DrawIndexedTriangleFan(Vertices: PVertex; VertexCount: LongWord; IndexList: PWord; TriangleCount: LongWord); overload; inline;

Draws an indexed triangle fan of TVertex.
Note that there may be at maximum 65536 vertices, because the index list is an array of 16 bit values each with a maximum value of 65536. If there are more than 65536 vertices in the list, results of this operation are not defined.

Parameters
Vertices
Pointer to array of vertices.
VertexCount
Amount of vertices in the array.
IndexList
Pointer to array of indices.
TriangleCount
Amount of Triangles. Usually amount of indices - 2.
Public procedure DrawIndexedTriangleFan(Vertices: PVertex2TCoords; VertexCount: LongWord; IndexList: PWord; TriangleCount: LongWord); overload; inline;

Draws an indexed triangle fan of TVertex2TCoords.
Note that there may be at maximum 65536 vertices, because the index list is an array of 16 bit values each with a maximum value of 65536. If there are more than 65536 vertices in the list, results of this operation are not defined.

Parameters
Vertices
Pointer to array of vertices.
VertexCount
Amount of vertices in the array.
IndexList
Pointer to array of indices.
TriangleCount
Amount of Triangles. Usually amount of indices - 2.
Public procedure DrawIndexedTriangleFan(Vertices: PVertexTangents; VertexCount: LongWord; IndexList: PWord; TriangleCount: LongWord); overload; inline;

Draws an indexed triangle fan of TVertexTangents.
Note that there may be at maximum 65536 vertices, because the index list is an array of 16 bit values each with a maximum value of 65536. If there are more than 65536 vertices in the list, results of this operation are not defined.

Parameters
Vertices
Pointer to array of vertices.
VertexCount
Amount of vertices in the array.
IndexList
Pointer to array of indices.
TriangleCount
Amount of Triangles. Usually amount of indices - 2.
Public procedure DrawIndexedTriangleList(Vertices: PVertex2TCoords; VertexCount: LongWord; IndexList: PWord; TriangleCount: LongWord); overload; inline;

Draws an indexed triangle list of TVertex2TCoords.
Note that there may be at maximum 65536 vertices, because the index list is an array of 16 bit values each with a maximum value of 65536. If there are more than 65536 vertices in the list, results of this operation are not defined.

Parameters
Vertices
Pointer to array of vertices.
VertexCount
Amount of vertices in the array.
IndexList
Pointer to array of indices.
TriangleCount
Amount of Triangles. Usually amount of indices - 2.
Public procedure DrawIndexedTriangleList(Vertices: PVertex; VertexCount: LongWord; IndexList: PWord; TriangleCount: LongWord); overload; inline;

Draws an indexed triangle list of TVertex.
Note that there may be at maximum 65536 vertices, because the index list is an array of 16 bit values each with a maximum value of 65536. If there are more than 65536 vertices in the list, results of this operation are not defined.

Parameters
Vertices
Pointer to array of vertices.
VertexCount
Amount of vertices in the array.
IndexList
Pointer to array of indices.
TriangleCount
Amount of Triangles. Usually amount of indices - 2.
Public procedure DrawIndexedTriangleList(Vertices: PVertexTangents; VertexCount: LongWord; IndexList: PWord; TriangleCount: LongWord); overload; inline;

Draws an indexed triangle list of TVertexTangents.
Note that there may be at maximum 65536 vertices, because the index list is an array of 16 bit values each with a maximum value of 65536. If there are more than 65536 vertices in the list, results of this operation are not defined.

Parameters
Vertices
Pointer to array of vertices.
VertexCount
Amount of vertices in the array.
IndexList
Pointer to array of indices.
TriangleCount
Amount of Triangles. Usually amount of indices - 2.
Public procedure DrawMeshBuffer(Buffer: TMeshBuffer); inline;

Draws a mesh buffer.

Parameters
Buffer
The mesh buffer.
Public procedure DrawPixel(X, Y: LongWord; Color: TARGBColor); inline;

Draws a single pixel.

Parameters
X
The x screen coordinate.
Y
The y screen coordinate.
Color
The pixel color.
Public procedure DrawStencilShadow(ClearStencilBuffer: Boolean = False; LeftUp: TARGBColor = $ff000000; RightUp: TARGBColor = $ff000000; LeftDown: TARGBColor = $ff000000; RightDown: TARGBColor = $ff000000); inline;

Fills the stencil shadow with color.
After the shadow volume has been drawn into the stencil buffer using TVideoDriver.DrawStencilShadowVolume, use this to draw the color of the shadow. Please note that the code for the opengl version of the method is based on free code sent in by Philipp Dortmann, lots of thanks go to him!

Parameters
ClearStencilBuffer
Set this to false, if you want to draw every shadow with the same color, and only want to call DrawStencilShadow once after all shadow volumes have been drawn. Set this to true, if you want to paint every shadow with its own color.
leftUpEdge
Color of the shadow in the upper left corner of screen.
rightUpEdge
Color of the shadow in the upper right corner of screen.
leftDownEdge
Color of the shadow in the lower left corner of screen.
rightDownEdge
Color of the shadow in the lower right corner of screen.
Public procedure DrawStencilShadowVolume(Triangles: PVector3D; Count: LongWord; ZFail: Boolean = True); inline;

Draws a shadow volume into the stencil buffer.
To draw a stencil shadow, do this: First, draw all geometry. Then use this method, to draw the shadow volume. Then, use TVideoDriver.DrawStencilShadow to visualize the shadow. Please note that the code for the opengl version of the method is based on free code sent in by Philipp Dortmann, lots of thanks go to him!

Parameters
Triangles
Pointer to array of 3d vectors, specifying the shadow volume.
Count
Amount of triangles in the array.
ZFail
If set to true, zfail method is used, otherwise zpass.
Public procedure DrawVertexPrimitiveList(Vertices: Pointer; VertexCount: LongWord; IndexList: Pointer; PrimCount: LongWord; VType: TVertexType = vtStandard; PType: TPrimitiveType = ptTriangles; IType: TIndexType = it16Bit); inline;

Draws a vertex primitive list.
Note that, depending on the index type, some vertices might be not accessible through the index list. The limit is at 65535 vertices for 16bit indices. Please note that currently not all primitives are available for all drivers, and some might be emulated via triangle renders.

Parameters
Vertices
Pointer to array of vertices.
VertexCount
Amount of vertices in the array.
IndexList
Pointer to array of indices. These define the vertices used for each primitive. Depending on the PType, indices are interpreted as single objets (for point like primitives), pairs (for lines), triplets (for triangles), or quads.
PrimCount
Amount of Primitives
VType
Vertex type, e.g. vtStandard for S3DVertex.
PType
Primitive type, e.g. ptTriangleFan for a triangle fan.
IType
Index type, e.g. it16Bit for 16bit indices.
Public procedure EnableClipPlane(Index: LongWord; Enable: Boolean=True); inline;

Enable or disable a clipping plane. There are at least 6 clipping planes available for the user to set at will.

Parameters
Index
The plane index. Must be between 0 and MaxUserClipPlanes.
Enable
If true, enable the clipping plane else disable it.
Public procedure EnableMaterial2D(Enable: Boolean = True); inline;

Enable the 2d override material.

Parameters
Enable
Flag which tells whether the material shall be enabled or disabled.
Public procedure FillMaterialStructureFromAttributes(out Material: TMaterial; Attributes: TAttributes); inline;

Fills an SMaterial structure from attributes.
Please note that for setting material types of the material, the video driver will need to query the material renderers for their names, so all non built-in materials must have been created before calling this method.

Parameters
Material
The material to set the properties for.
Attributes
The attributes to read from.
Public procedure MakeColorKeyTexture(Texture: TTexture; Color: TARGBColor; ZeroTexels: Boolean = False); overload; inline;

Warning: this symbol is deprecated.

Sets a boolean alpha channel on the texture based on the color at a position.
This makes the texture fully transparent at the texels where the color key can be found when using for example draw2DImage with useAlphachannel==true. The alpha of other texels is not modified.

Parameters
Texture
Texture whose alpha channel is modified.
Color
Color key color. Every texel with this color will become fully transparent as described above. Please note that the colors of a texture may be converted when loading it, so the color values may not be exactly the same in the engine and for example in picture edit programs. To avoid this problem, you could use the makeColorKeyTexture method, which takes the position of a pixel instead a color value.
ZeroTexels
If set to true, then any texels that match the color key will have their color, as well as their alpha, set to zero (i.e. black). This behaviour matches the legacy (buggy) behaviour prior to release 1.5 and is provided for backwards compatibility only.
Public procedure MakeColorKeyTexture(Texture: TTexture; ColorKeyPixelPos: TPoint; ZeroTexels: Boolean = False); overload; inline;

Warning: this symbol is deprecated.

Sets a boolean alpha channel on the texture based on the color at a position.
This makes the texture fully transparent at the texels where the color key can be found when using for example draw2DImage with useAlphachannel==true. The alpha of other texels is not modified.

Parameters
Texture
Texture whose alpha channel is modified.
ColorKeyPixelPos
Position of a pixel with the color key color. Every texel with this color will become fully transparent as described above.
ZeroTexels
If set to true, then any texels that match the color key will have their color, as well as their alpha, set to zero (i.e. black). This behaviour matches the legacy (buggy) behaviour prior to release 1.5 and is provided for backwards compatibility only.
Public procedure MakeNormalMapTexture(Texture: TTexture; Amplitude: Single = 1.0); inline;

Creates a normal map from a height map texture. component of the texture as addition. This value is used by the mtParallaxMapSolid material and similar materials.

Parameters
If
the target texture has 32 bit, the height value is stored in the alpha
Texture
Texture whose alpha channel is modified.
Amplitude
Constant value by which the height information is multiplied.
Public procedure RemoveAllHardwareBuffers; inline;

Removes all hardware buffers.

Public procedure RemoveAllTextures; inline;

Removes all textures from the texture cache and deletes them. pointer to the instances of TTexture may no longer be valid, if it was not grabbed before by other parts of the engine for storing it longer. So it is a good idea to set all materials which are using this texture to nil or another texture first.

Returns

This method can free a lot of memory! Please note that after calling this, the

Public procedure RemoveTexture(Texture: TTexture); inline;

Removes a texture from the texture cache and deletes it.
This method can free a lot of memory! Please note that after calling this, the pointer to the TTexture instance may no longer be valid, if it was not grabbed before by other parts of the engine for storing it longer. So it is a good idea to set all materials which are using this texture to 0 or another texture first.

Parameters
Texture
Texture to delete from the engine cache.
Public procedure RemvoveHardwareBuffer(Buffer: TMeshBuffer); inline;

Removes hardware buffer for a mesh buffer.

Public procedure RenameTexture(Texture: TTexture; const NewName: StringType); inline;

Renames a texture.

Parameters
Texture
Pointer to the texture to rename.
NewName
New name for the texture. This should be a unique name.
Public procedure SetFog(const NFog: TFog); inline;

Sets the fog mode.
These are global values attached to each 3d object rendered, which has the fog flag enabled in its material.

Public procedure SetMaterial(const Material: TMaterial); inline;

Sets a material.
All 3d drawing functions will draw geometry using this material thereafter.

Parameters
Material
Material to be used from now on.
Public procedure SetMaterialRendererName(Index: LongInt; const RName: AnsiString); inline;

Sets the name of a material renderer.
Will have no effect on built-in material renderers.

Parameters
Index
Id of the material renderer. Can be a value of the TMaterialType enum or a value which was returned by AddMaterialRenderer.
RName
New name of the material renderer.
Public procedure SetTextureCreationFlag(Flag: TTextureCreationFlag; Enabled: Boolean = True); inline;

Enables or disables a texture creation flag.
These flags define how textures should be created. By changing this value, you can influence for example the speed of rendering a lot. But please note that the video drivers take this value only as recommendation. It could happen that you enable the tcfAlways16Bit mode, but the driver still creates 32 bit textures.

Parameters
Flag
Texture creation flag.
Enabled
Specifies if the given flag should be enabled or disabled.
Public procedure SetTransform(State: TTransformationState; const Mat: TMatrix4); inline;

Sets transformation matrices.

Parameters
State
Transformation type to be set, e.g. view, world, or projection.
Mat
Matrix describing the transformation.
Public procedure TurnLightOn(LightIndex: LongInt; TurnOn: Boolean = True); inline;

Turns a dynamic light on or off.

Parameters
LightIndex
The index returned by addDynamicLight
TurnOn
True to turn the light on, false to turn it off.

Properties

Public property ColorFormat: TColorFormat read GetColorFormat;

The current color format of the color buffer.

Public property CurrentRenderTargetSize: TPoint read GetCurrentRenderTargetSize;

The size of the current render target.
This value will equal the screen size if the driver doesn't support render to texture, or if the current render target is the screen.

Public property DriverType: TVideoDriverType read FDriverType;

The driver type.

Public property ExposedVideoData: TExposedVideoData read GetExposedVideoData;

Returns driver and operating system specific data about the TVideoDriver.
This method should only be used if the engine should be extended without having to modify the source of the engine.

Public property FPS: LongInt read GetFPS;

Returns current frames per second value. This value is updated approximately every 1.5 seconds and is only intended to provide a rough guide to the average frame rate. It is not suitable for use in performing timing calculations or framerate independent movement.

Public property ImageLoaderCount: LongWord read GetImageLoaderCount;

The number of installed image loaders.

Public property ImageWriterCount: LongWord read GetImageWriterCount;

The number of installed image writers.

Public property Material2D: PMaterial read GetMaterial2D;

The 2d override material for altering its values.
The 2d override materual allows to alter certain render states of the 2d methods. Not all members of SMaterial are honored, especially not MaterialType and Textures. Moreover, the zbuffer is always ignored, and lighting is always off. All other flags can be changed, though some might have to effect in most cases. Please note that you have to enable/disable this effect with enableInitMaterial2D(). This effect is costly, as it increases the number of state changes considerably. Always reset the values when done.

Public property MaterialRendererCount: LongWord read GetMaterialRendererCount;

The number of currently available material renderers.

Public property MaxDynamicLightAmount: LongWord read GetMaximalDynamicLightAmount;

The maximum number of dynamic lights the device can handle.

Public property MaxPrimitiveCount: LongWord read GetMaximalPrimitiveCount;

The maximum number of primitives (mostly vertices) which the device is able to render with one DrawVertexPrimitiveList call.

Public property MaxTextureSize: TSize read GetMaxTextureSize;

The maximum texture size supported.

Public property MinHardwareBufferVertexCount: LongWord write SetMinHardwareBufferVertexCount;

The minimum number of vertices for which a hw buffer will be created.

Public property Name: StringType read GetName;

The name of the video driver, e.g. in case of the Direct3D8 driver, it would return "Direct3D 8.1".

Public property OverrideMaterial: POverrideMaterial read GetOverrideMaterial;

The global Material which might override local materials.
Depending on the enable flags, values from this Material are used to override those of local materials of some meshbuffer being rendered.

Public property ScreenSize: TSize read GetScreenSize;

The size of the screen or render window.

Public property TextureCount: LongWord read GetTextureCount;

The number of textures currently loaded.

Public property VendorInfo: AnsiString read GetVendorInfo;

The graphics card vendor name.

Public property ViewPort: TRect read GetViewPort write SetViewPort;

The view port, i.e. the rectangle defining the area of rendering operations.

Public property WasRecentlyReset: Boolean read CheckDriverReset;

Whether the driver was recently reset.
For D3D devices you will need to recreate the RTTs if the driver was reset. Should be queried right after BeginScene.


Generated by PasDoc 0.12.1 on 2012-09-14 17:32:22