Class TDisplay
Unit
a3dge
Declaration
type TDisplay = class(TObject)
Description
Default display.
This is a quite simple display configured for OpenGL.
See also
- TA3DGEApplication.Display
- Access to display.
Hierarchy
Overview
Methods
Properties
 |
property Title: String read fTitle write SetTitle; |
 |
property CenterX: Integer read fCenterX; |
 |
property CenterY: Integer read fCenterY; |
 |
property Width: Integer read fWidth; |
 |
property Height: Integer read fHeight; |
 |
property Windowed: Boolean read fWindowed write SetWindowed; |
 |
property OnOpen: TNotifyEvent read fOnOpen; |
 |
property OnClose: TNotifyEvent read fOnClose; |
Description
Methods
 |
function GetDisplayFlags: AL_INT; |
Return flags to be applied to the display.
Note that Open will use only flags that are compatible with the display configuration.
See also
- TDisplay.Open
- Open the display.
- TDisplay.GetWindowSize
- Get default window size for windowed mode.
|
 |
procedure GetWindowSize (out aWidth, aHeight: Integer); |
Get default window size for windowed mode.
Right now it returns a window that fits in the current desktop with 16:9 proportion.
See also
- TDisplay.GetDisplaySize
- Get default display size for full screen mode.
- TDisplay.Open
- Open the display.
- TDisplay.GetDisplayFlags
- Return flags to be applied to the display.
|
 |
procedure Close; |
Close and release all used resources.
Note that this will destroy the Allegro display (if exists) so if it is used as source of events it will not be used anymore, and video bitmaps will be invalidated. Read Allegro documentation for details.
See also
- TDisplay.Open
- Open the display.
- TDisplay.OnClose
- Notifies when display is going to close.
|
 |
constructor Create; |
Constructor.
|
 |
destructor Destroy; override; |
Destructor.
|
 |
procedure SetOrthographicProjection; |
Set orthogonal projection for full display.
Note this method will also change the viewport to the whole display.
For OpenGL, screen coordinates are -1 to 1 in both height and width. For Allegro, it is pixel coordinates.
See also
- TDisplay.Width
- Display width.
- TDisplay.Height
- Display height.
- TDisplay.Open
- Open the display.
- TCamera.SetOrthographicProjection
- Change the camera projection matrix for orthographic (paralel) projection.
|
 |
procedure SetAsTarget; |
Set display as target for rendering.
See also
- TDisplay.FlipDisplay
- Do the apropiate operation so that what has been drawn previously on the display become visible on screen.
- TDisplay.Open
- Open the display.
|
 |
procedure FlipDisplay; |
Do the apropiate operation so that what has been drawn previously on the display become visible on screen.
See also
- TDisplay.Open
- Open the display.
- TDisplay.SetAsTarget
- Set display as target for rendering.
|
 |
procedure ScreenShot; |
Take a screenshot.
|
Properties
 |
property Title: String read fTitle write SetTitle; |
Window title.
You can set it before or after opening the display.
|
 |
property CenterX: Integer read fCenterX; |
Display center X.
|
 |
property CenterY: Integer read fCenterY; |
Display center Y.
|
 |
property Width: Integer read fWidth; |
Display width.
|
 |
property Height: Integer read fHeight; |
Display height.
|
 |
property Windowed: Boolean read fWindowed write SetWindowed; |
To select windowed or full screen mode.
If the display is opened, it will be closed and then reopened. That will trigger the OnClose and OnOpen events in order.
If DEBUGMODE is defined default is True , else default is False .
See also
- TDisplay.Open
- Open the display.
|
 |
property OnClose: TNotifyEvent read fOnClose; |
Notifies when display is going to close.
This will be notified before the display is closed.
See also
- TDisplay.Close
- Close and release all used resources.
- TDisplay.IsOpen
- Check if display is open.
- TDisplay.OnOpen
- Notifies when display opens.
|
Generated by PasDoc 0.15.0. Generated on 2025-07-31 11:41:01.
|