Class TCustomDXDraw (unit DXDraws)

Inherits from

TCustomControl

Constructors


constructor Create(AOwner: TComponent);

Palette making


Functions

destructor Destroy;


class function Drivers: TDirectXDrivers;


procedure Finalize;


procedure Flip;


procedure Initialize;


procedure RegisterNotifyEvent(NotifyEvent: TDXDrawNotifyEvent);


procedure Render;


procedure Restore;


procedure Setbounds(ALeft, ATop, AWidth, AHeight: Integer);


procedure SetSize(ASurfaceWidth, ASurfaceHeight: Integer);


procedure UnRegisterNotifyEvent(NotifyEvent: TDXDrawNotifyEvent);


procedure UpdatePalette;


procedure DoFinalize;

CM_ACTIVATE: begin DefWindowProc(Message); if AutoInitialize and (not FInitalized2) then Initialize; Exit; end;

procedure DoFinalizeSurface;


procedure DoInitialize;


procedure DoInitializeSurface;


procedure DoInitializing;


procedure DoRestoreSurface;


procedure Loaded;


procedure Paint;

Resource initialization.

function PaletteChanged(Foreground: Boolean): Boolean;


procedure SetParent(AParent: TWinControl);


procedure FormWndProc(var Message: TMessage; DefWindowProc: TWndMethod);


function GetCanDraw: Boolean;


function GetCanPaletteAnimation: Boolean;


function GetSurfaceHeight: Integer;


function GetSurfaceWidth: Integer;


procedure NotifyEventList(NotifyType: TDXDrawNotifyType);


procedure SetAutoSize(Value: Boolean);


procedure SetColorTable(const ColorTable: TRGBQuads);


procedure SetCooperativeLevel;


procedure SetDisplay(Value: TDirectDrawDisplay);


procedure SetDriver(Value: PGUID);


procedure SetOptions(Value: TDXDrawOptions);


procedure SetSurfaceHeight(Value: Integer);


procedure SetSurfaceWidth(Value: Integer);


function TryRestore: Boolean;


procedure WMCreate(var Message: TMessage);


Properties

property AutoInitialize : Boolean


property AutoSize : Boolean


property Camera : IDirect3DRMFrame


property CanDraw : Boolean


property CanPaletteAnimation : Boolean


property Clipper : TDirectDrawClipper


property D3D : IDirect3D


property D3D2 : IDirect3D2


property D3DDevice : IDirect3DDevice


property D3DDevice2 : IDirect3DDevice2


property D3DRM : IDirect3DRM


property D3DRM2 : IDirect3DRM2


property D3DRMDevice : IDirect3DRMDevice


property D3DRMDevice2 : IDirect3DRMDevice2


property DDraw : TDirectDraw


property Display : TDirectDrawDisplay


property Driver : PGUID


property Initialized : Boolean


property NowOptions : TDXDrawOptions


property Options : TDXDrawOptions


property Palette : TDirectDrawPalette


property Primary : TDirectDrawSurface


property Scene : IDirect3DRMFrame


property Surface : TDirectDrawSurface


property SurfaceHeight : Integer


property SurfaceWidth : Integer


property Viewport : IDirect3DRMViewport


property ZBuffer : TDirectDrawSurface


Events

event OnFinalize : TNotifyEvent


event OnFinalizeSurface : TNotifyEvent


event OnInitialize : TNotifyEvent


event OnInitializeSurface : TNotifyEvent


event OnInitializing : TNotifyEvent


event OnRestoreSurface : TNotifyEvent


Variables

ColorTable : TRGBQuads;


DefColorTable : TRGBQuads;


FAutoInitialize : Boolean;


FAutoSize : Boolean;


FCalledDoInitialize : Boolean;


FCalledDoInitializeSurface : Boolean;


FCamera : IDirect3DRMFrame;


FClipper : TDirectDrawClipper;


FD3D : IDirect3D;


FD3D2 : IDirect3D2;


FD3DDevice : IDirect3DDevice;


FD3DDevice2 : IDirect3DDevice2;


FD3DDeviceDesc : D3DDEVICEDESC;


FD3DRM : IDirect3DRM;


FD3DRM2 : IDirect3DRM2;


FD3DRMDevice : IDirect3DRMDevice;


FD3DRMDevice2 : IDirect3DRMDevice2;


FDDraw : TDirectDraw;


FDisplay : TDirectDrawDisplay;


FDriver : PGUID;


FDriverGUID : TGUID;


FDXDrawDriver : TObject;


FForm : TCustomForm;


FHELDeviceDesc : D3DDEVICEDESC;


FHWDeviceDesc : D3DDEVICEDESC;


FInitialized : Boolean;


FInitialized2 : Boolean;


FInternalInitialized : Boolean;


FNotifyEventList : TList;


FNowOptions : TDXDrawOptions;


FOffNotifyRestore : Integer;


FOnFinalize : TNotifyEvent;


FOnFinalizeSurface : TNotifyEvent;


FOnInitialize : TNotifyEvent;


FOnInitializeSurface : TNotifyEvent;


FOnInitializing : TNotifyEvent;


FOnRestoreSurface : TNotifyEvent;


FOptions : TDXDrawOptions;


FPalette : TDirectDrawPalette;


FPrimary : TDirectDrawSurface;


FScene : IDirect3DRMFrame;


FSubClass : TControlSubClass;


FSurface : TDirectDrawSurface;


FSurfaceHeight : Integer;


FSurfaceWidth : Integer;


FUpdating : Boolean;


FViewport : IDirect3DRMViewport;


FZBuffer : TDirectDrawSurface;



Constructors


constructor Create(AOwner: TComponent);

Palette making


Functions


destructor Destroy;


class function Drivers: TDirectXDrivers;


procedure Finalize;


procedure Flip;


procedure Initialize;


procedure RegisterNotifyEvent(NotifyEvent: TDXDrawNotifyEvent);


procedure Render;


procedure Restore;


procedure Setbounds(ALeft, ATop, AWidth, AHeight: Integer);


procedure SetSize(ASurfaceWidth, ASurfaceHeight: Integer);


procedure UnRegisterNotifyEvent(NotifyEvent: TDXDrawNotifyEvent);


procedure UpdatePalette;


procedure DoFinalize;

CM_ACTIVATE: begin DefWindowProc(Message); if AutoInitialize and (not FInitalized2) then Initialize; Exit; end;


procedure DoFinalizeSurface;


procedure DoInitialize;


procedure DoInitializeSurface;


procedure DoInitializing;


procedure DoRestoreSurface;


procedure Loaded;


procedure Paint;

Resource initialization.


function PaletteChanged(Foreground: Boolean): Boolean;


procedure SetParent(AParent: TWinControl);


procedure FormWndProc(var Message: TMessage; DefWindowProc: TWndMethod);


function GetCanDraw: Boolean;


function GetCanPaletteAnimation: Boolean;


function GetSurfaceHeight: Integer;


function GetSurfaceWidth: Integer;


procedure NotifyEventList(NotifyType: TDXDrawNotifyType);


procedure SetAutoSize(Value: Boolean);


procedure SetColorTable(const ColorTable: TRGBQuads);


procedure SetCooperativeLevel;


procedure SetDisplay(Value: TDirectDrawDisplay);


procedure SetDriver(Value: PGUID);


procedure SetOptions(Value: TDXDrawOptions);


procedure SetSurfaceHeight(Value: Integer);


procedure SetSurfaceWidth(Value: Integer);


function TryRestore: Boolean;


procedure WMCreate(var Message: TMessage);


Properties


property AutoInitialize : Boolean


property AutoSize : Boolean


property Camera : IDirect3DRMFrame


property CanDraw : Boolean


property CanPaletteAnimation : Boolean


property Clipper : TDirectDrawClipper


property D3D : IDirect3D


property D3D2 : IDirect3D2


property D3DDevice : IDirect3DDevice


property D3DDevice2 : IDirect3DDevice2


property D3DRM : IDirect3DRM


property D3DRM2 : IDirect3DRM2


property D3DRMDevice : IDirect3DRMDevice


property D3DRMDevice2 : IDirect3DRMDevice2


property DDraw : TDirectDraw


property Display : TDirectDrawDisplay


property Driver : PGUID


property Initialized : Boolean


property NowOptions : TDXDrawOptions


property Options : TDXDrawOptions


property Palette : TDirectDrawPalette


property Primary : TDirectDrawSurface


property Scene : IDirect3DRMFrame


property Surface : TDirectDrawSurface


property SurfaceHeight : Integer


property SurfaceWidth : Integer


property Viewport : IDirect3DRMViewport


property ZBuffer : TDirectDrawSurface


Events


event OnFinalize : TNotifyEvent


event OnFinalizeSurface : TNotifyEvent


event OnInitialize : TNotifyEvent


event OnInitializeSurface : TNotifyEvent


event OnInitializing : TNotifyEvent


event OnRestoreSurface : TNotifyEvent


Variables


ColorTable : TRGBQuads;


DefColorTable : TRGBQuads;


FAutoInitialize : Boolean;


FAutoSize : Boolean;


FCalledDoInitialize : Boolean;


FCalledDoInitializeSurface : Boolean;


FCamera : IDirect3DRMFrame;


FClipper : TDirectDrawClipper;


FD3D : IDirect3D;


FD3D2 : IDirect3D2;


FD3DDevice : IDirect3DDevice;


FD3DDevice2 : IDirect3DDevice2;


FD3DDeviceDesc : D3DDEVICEDESC;


FD3DRM : IDirect3DRM;


FD3DRM2 : IDirect3DRM2;


FD3DRMDevice : IDirect3DRMDevice;


FD3DRMDevice2 : IDirect3DRMDevice2;


FDDraw : TDirectDraw;


FDisplay : TDirectDrawDisplay;


FDriver : PGUID;


FDriverGUID : TGUID;


FDXDrawDriver : TObject;


FForm : TCustomForm;


FHELDeviceDesc : D3DDEVICEDESC;


FHWDeviceDesc : D3DDEVICEDESC;


FInitialized : Boolean;


FInitialized2 : Boolean;


FInternalInitialized : Boolean;


FNotifyEventList : TList;


FNowOptions : TDXDrawOptions;


FOffNotifyRestore : Integer;


FOnFinalize : TNotifyEvent;


FOnFinalizeSurface : TNotifyEvent;


FOnInitialize : TNotifyEvent;


FOnInitializeSurface : TNotifyEvent;


FOnInitializing : TNotifyEvent;


FOnRestoreSurface : TNotifyEvent;


FOptions : TDXDrawOptions;


FPalette : TDirectDrawPalette;


FPrimary : TDirectDrawSurface;


FScene : IDirect3DRMFrame;


FSubClass : TControlSubClass;


FSurface : TDirectDrawSurface;


FSurfaceHeight : Integer;


FSurfaceWidth : Integer;


FUpdating : Boolean;


FViewport : IDirect3DRMViewport;


FZBuffer : TDirectDrawSurface;