|
Drag[en]gine Game Engine 1.32.3
|
Render window. More...
#include <deRenderWindow.h>
Public Types | |
| using | Ref = deTObjectReference< deRenderWindow > |
| Type holding strong reference. | |
Public Types inherited from deResource | |
| using | Ref = deTObjectReference< deResource > |
| Type holding strong reference. | |
Public Types inherited from deObject | |
| using | Ref = deTObjectReference< deObject > |
| Type holding strong reference. | |
Public Member Functions | |
Management | |
| int | GetX () const |
| Hosting render window or NULL if not set. | |
| int | GetY () const |
| Y position in pixels. | |
| void | SetPosition (int x, int y) |
| Set position in pixels. | |
| int | GetWidth () const |
| Width in pixels. | |
| int | GetHeight () const |
| Height in pixels. | |
| void | SetSize (int width, int height) |
| Set size in pixels. | |
| bool | GetFullScreen () const |
| Window is full screen. | |
| void | SetFullScreen (bool fullscreen) |
| Set if the window is full screen. | |
| int | GetScaleFactor () const |
| Window scale factor multiplied by 100 (monitor/DPI scaling). | |
| void | SetScaleFactor (int scaleFactor) |
| Set window scale factor multiplied by 100 (monitor/DPI scaling). | |
| bool | GetHdrOutput () const |
| Render window is using HDR output. | |
| void | SetHdrOutput (bool hdrOutput) |
| Set if the render window is using HDR output. | |
| bool | GetNotifyScriptOnResize () const |
| Script is notified about the window changing size. | |
| void | SetNotifyScriptOnResize (bool notify) |
| Set if the script is notified about the window chaning size. | |
| bool | GetPaint () const |
| Painting enabled. | |
| void | SetPaint (bool paint) |
| Set if painting is enabled. | |
| const decString & | GetTitle () const |
| Render window title. | |
| void | SetTitle (const char *title) |
| Set render window title. | |
| const deImage::Ref & | GetIcon () const |
| Icon. | |
| void | SetIcon (deImage *icon) |
| Set icon. | |
| const deCanvasView::Ref & | GetCanvasView () const |
| Canvas defining the content to render. | |
System Peers | |
| deBaseGraphicRenderWindow * | GetPeerGraphic () const |
| Graphic system peer or NULL if not set. | |
| void | SetPeerGraphic (deBaseGraphicRenderWindow *peer) |
| Set graphic system peer or NULL if not set. | |
Public Member Functions inherited from deResource | |
| deResourceManager * | GetResourceManager () const |
| Resource manager or NULL if resource is leaking. | |
| deEngine * | GetEngine () const |
| Game engine object from resource manager. | |
| decTLinkedList< deResource >::Element & | GetLLManager () |
| Resource manager linked list. | |
| const decTLinkedList< deResource >::Element & | GetLLManager () const |
| void | MarkLeaking () |
| Marks the resource leaking. | |
| deResource (deResourceManager *resourceManager) | |
| Create resource. | |
Public Member Functions inherited from deObject | |
| int | GetRefCount () const |
| Reference count. | |
| void | AddReference () |
| Add reference increasing reference count by 1. | |
| void | FreeReference () |
| Decrease reference count by one and delete object if count reaches 0. | |
| cWeakRefData * | AddWeakReference () |
| Add weak reference. | |
| deObject () | |
| Create object with reference count of 1. | |
Constructors and Destructors | |
| deRenderWindow (deRenderWindowManager *manager) | |
| Create render window. | |
| ~deRenderWindow () override | |
| Clean up render window. | |
Additional Inherited Members | |
Protected Member Functions inherited from deResource | |
| ~deResource () override | |
| Clean up resource. | |
Protected Member Functions inherited from deObject | |
| virtual | ~deObject () |
| Clean up object. | |
Render window.
Render windows are used by hosting applications to redirect the rendered output of an embedded engine session into one or more sub windows. The graphic module decides how the window is used for rendering. The window is peered so changing the graphic module is not a problem. The only actions required by the hosting application is to notify the render window about size changes so the graphic module can take the necessary steps.
For working with the hosting window handle you can use two different ways. You can either specify the hosting window using a generic function which mangles the window handle into an integer value or use an OS specific function. The generic function has the advantage that you do not have to worry about the operating system your application is running on. Most GUI toolkits provide a generic access to the window handles so you can simply carry over the value. The OS specific functions are convenient if you work with only one OS or you need specific code anyways.
Type holding strong reference.
| deRenderWindow::deRenderWindow | ( | deRenderWindowManager * | manager | ) |
Create render window.
|
overrideprotected |
Clean up render window.
|
inline |
Canvas defining the content to render.
The canvas view is automatically resized to fill the entire window.
|
inline |
Window is full screen.
|
inline |
Render window is using HDR output.
|
inline |
Height in pixels.
|
inline |
Icon.
|
inline |
Script is notified about the window changing size.
|
inline |
Painting enabled.
Render windows can be hidden by other windows in a GUI toolkit or otherwise set invisible due to properties outside of the knowledge of the Graphic Module. Disabling painting avoids the Graphic Module wasting time rendering render window content if it is not visible.
|
inline |
Graphic system peer or NULL if not set.
|
inline |
Window scale factor multiplied by 100 (monitor/DPI scaling).
|
inline |
Render window title.
|
inline |
Width in pixels.
|
inline |
Hosting render window or NULL if not set.
Set hosting render window or NULL to let the graphic system create a window.
This has to be set before creating the graphic module peer. For this reason for use only by deRenderWindowManager.
Render window.
Set render window.
For use by Graphic Module only.
X position in pixels.
|
inline |
Y position in pixels.
| void deRenderWindow::SetFullScreen | ( | bool | fullscreen | ) |
Set if the window is full screen.
| void deRenderWindow::SetHdrOutput | ( | bool | hdrOutput | ) |
Set if the render window is using HDR output.
| void deRenderWindow::SetIcon | ( | deImage * | icon | ) |
Set icon.
| void deRenderWindow::SetNotifyScriptOnResize | ( | bool | notify | ) |
Set if the script is notified about the window chaning size.
| void deRenderWindow::SetPaint | ( | bool | paint | ) |
Set if painting is enabled.
Render windows can be hidden by other windows in a GUI toolkit or otherwise set invisible due to properties outside of the knowledge of the Graphic Module. Disabling painting avoids the Graphic Module wasting time rendering render window content if it is not visible.
| void deRenderWindow::SetPeerGraphic | ( | deBaseGraphicRenderWindow * | peer | ) |
Set graphic system peer or NULL if not set.
| void deRenderWindow::SetPosition | ( | int | x, |
| int | y | ||
| ) |
Set position in pixels.
| void deRenderWindow::SetScaleFactor | ( | int | scaleFactor | ) |
Set window scale factor multiplied by 100 (monitor/DPI scaling).
| void deRenderWindow::SetSize | ( | int | width, |
| int | height | ||
| ) |
Set size in pixels.
| deeInvalidParam | width is less than 1. |
| deeInvalidParam | height is less than 1. |
| void deRenderWindow::SetTitle | ( | const char * | title | ) |
Set render window title.