Class TPHXDevice

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TPHXDevice = class(TPHXCustomDevice)

Description

The device manages a graphics device and its window

Hierarchy

  • TPHXCustomDevice
  • TPHXDevice

Overview

Methods

Public constructor Create; overload;
Public constructor Create(const AProvider: String); overload;
Public constructor Create(const AProvider: TPHXProvider); overload;
Public constructor Create(const ADevice: IPHXDevice); overload;
Public destructor Destroy; override;
Public procedure Initialize; overload;
Public procedure Initialize(const Title: String; const Width, Height: Integer); overload;
Public procedure Initialize(const Title: String; const Width, Height: Integer; const Fullscreen: Boolean); overload;
Public procedure Reinitialize; overload;
Public procedure Reinitialize(const Width, Height: Integer; const Fullscreen: Boolean); overload;
Public procedure Finalize;
Public function CreateRenderTarget: TPHXRenderTarget;
Public function CreateCanvas: TPHXCanvas;
Public function CreateEffect: TPHXEffect;
Public function CreateBuffer: TPHXBuffer;
Public function CreateTexture: TPHXTexture;
Public procedure SetRenderTarget(Target: TPHXRenderTarget);
Public procedure SetViewport(const Viewport: TViewport); overload;
Public procedure SetViewport(const X, Y, Width, Height: Integer); overload;
Public procedure SetViewport(const Width, Height: Integer); overload;
Public procedure SetClearColor(const Color: TColor4f); overload;
Public procedure SetClearColor(const Red, Green, Blue: Single); overload;
Public procedure SetBlending(const Value: TPHXBlendMode);
Public procedure SetWireFrame(const Value: Boolean);
Public procedure SetDepthMask(const Value: Boolean);
Public procedure SetDepthTest(const Value: Boolean);
Public procedure Update;
Public procedure Clear;
Public procedure Flip;

Properties

Public property Provider: TPHXProvider read FProvider;
Public property Renderer: IPHXDevice read FRenderer;
Public property Target: TPHXProviderTarget read GetTarget;
Public property Display: TPHXDisplay read FDisplay;
Public property Title: String read FTitle write SetTitle;
Public property Width: Integer read GetWidth;
Public property Height: Integer read GetHeight;
Public property Flags: TPHXWindowFlags read FFlags write SetFlags;
Public property Icon: String read FIcon write SetIcon;
Public property Bounds: TRecti read GetBounds;
Public property WireFrame: Boolean read FWireFrame write SetWireFrame;

Description

Methods

Public constructor Create; overload;

Creates a device from the default provicer

Public constructor Create(const AProvider: String); overload;

Creates a device from a registered provider

Public constructor Create(const AProvider: TPHXProvider); overload;

Creates a device from a custom provider

Public constructor Create(const ADevice: IPHXDevice); overload;

Creates a device from a custom device

Public destructor Destroy; override;

Destroys the device

Public procedure Initialize; overload;

Initialize the device using the selected display mode

See also
TPHXDisplay
Manager class for display modes
Public procedure Initialize(const Title: String; const Width, Height: Integer); overload;

Initialize the device

Parameters
Title
The title of the window
Width
Width of the window
Height
Height of the window
Public procedure Initialize(const Title: String; const Width, Height: Integer; const Fullscreen: Boolean); overload;

Initialize the device

Parameters
Title
The title of the window
Width
Width of the window
Height
Height of the window
Fullscreen
Toggles if the window should be opened in fullscreen mode
Public procedure Reinitialize; overload;

Initialize the device using the selected display mode

See also
TPHXDisplay
Manager class for display modes
Public procedure Reinitialize(const Width, Height: Integer; const Fullscreen: Boolean); overload;

Reinitializes the device using a new display mode

Public procedure Finalize;

Finalize the device

Public function CreateRenderTarget: TPHXRenderTarget;

Create a new render target

Public function CreateCanvas: TPHXCanvas;

Creates a new canvas

Public function CreateEffect: TPHXEffect;

Creates a new basic effect

Public function CreateBuffer: TPHXBuffer;

Creates a render buffer

Public function CreateTexture: TPHXTexture;

Creates a new texture

Public procedure SetRenderTarget(Target: TPHXRenderTarget);

Create a stencil mask function CreateStencilMask: TPHXStencilMask; Set the current render target

Public procedure SetViewport(const Viewport: TViewport); overload;

Change the current graphical viewport

Public procedure SetViewport(const X, Y, Width, Height: Integer); overload;

Change the current graphical viewport

Public procedure SetViewport(const Width, Height: Integer); overload;

Change the current graphical viewport

Public procedure SetClearColor(const Color: TColor4f); overload;

Sets the clear color

Public procedure SetClearColor(const Red, Green, Blue: Single); overload;

Sets the background color

Public procedure SetBlending(const Value: TPHXBlendMode);

Change the blend mode

Public procedure SetWireFrame(const Value: Boolean);

Toggles wireframe

Public procedure SetDepthMask(const Value: Boolean);

Enable or disable writing into the depth buffer

Public procedure SetDepthTest(const Value: Boolean);

Enable or disable depth testing

Public procedure Update;

Update the renderer

Public procedure Clear;

Clear the back buffers

Public procedure Flip;

Flip the front and back buffers

Properties

Public property Provider: TPHXProvider read FProvider;

The provider

Public property Renderer: IPHXDevice read FRenderer;

The device interface

Public property Target: TPHXProviderTarget read GetTarget;

Return the provider target of this renderer

Public property Display: TPHXDisplay read FDisplay;

Selected display mode

Public property Title: String read FTitle write SetTitle;

Change the window title

Public property Width: Integer read GetWidth;

Returns the current width of the device window

Public property Height: Integer read GetHeight;

Returns the current height of the device window

Public property Flags: TPHXWindowFlags read FFlags write SetFlags;

Read or change the whe window flags

Public property Icon: String read FIcon write SetIcon;

The bitmap file containing the window icon

Public property Bounds: TRecti read GetBounds;

Return the bounding rectangle of the display

Public property WireFrame: Boolean read FWireFrame write SetWireFrame;

Toggles wireframe


Generated by PasDoc 0.13.0 on 2013-08-26 11:02:37