Om  1.0.0
A universal framework for multimedia simulation
Classes | Public Member Functions | List of all members
om::graphics::devices::GraphicsContextWindow Class Reference

A class that facilitates creation of a simple graphics rendering context in a native GUI window. More...

#include <omGraphicsContextWindow.h>

Inheritance diagram for om::graphics::devices::GraphicsContextWindow:
om::graphics::gui::objects::GUIObject om::gui::input::InputHandler

Classes

class  Delegate
 A class that contains function objects that recieve context window events. More...
 

Public Member Functions

 GraphicsContextWindow (const UTF8String &title, const Size2D &size)
 Create a centered graphics context window with the specified size. More...
 
 GraphicsContextWindow (const UTF8String &title, const Size2D &size, const Vector2i &position)
 Create a centered graphics context window with the specified size and position. More...
 
 ~GraphicsContextWindow ()
 Destroy this context window, releasing all non-shared resources. More...
 
gui::WindowgetWindow ()
 Return a pointer to the underlying window of this graphics context window. More...
 
const gui::WindowgetWindow () const
 Return a const pointer to the underlying window of this graphics context window. More...
 
Size2D getFrameSize () const
 Return the size in pixels of this graphics context window's outside area (including title bar, frame). More...
 
Size2D getContentSize () const
 Return the size in pixels of this graphics context window's content area. More...
 
Bool setContentSize (const Size2D &newSize)
 Set the size in pixels of this graphics context window's content area. More...
 
Vector2i getPosition () const
 Get the position of the window relative to the top left corner of the screen (in pixels). More...
 
Bool setPosition (const Vector2i &position)
 Set the position of the window relative to the top left corner of the screen (in pixels). More...
 
Bool center ()
 Center the window within the screen where it currently resides. More...
 
UTF8String getTitle () const
 Return the title string for this window. More...
 
Bool setTitle (const UTF8String &newTitle)
 Set the title string for this window. More...
 
Bool moveToFront ()
 Move the window to the front of the window order (in it's level) within an application. More...
 
Bool moveToBack ()
 Move the window to the back of the window order, beneath all windows but the desktop. More...
 
Bool getIsVisible () const
 Return whether or not the window is currently visible. More...
 
Bool setIsVisible (Bool newIsVisible)
 Set whether or not the window should be visible. More...
 
Bool getIsMinimized () const
 Return a boolean value indicating whether or not a window is currently minimized. More...
 
Bool setIsMinimized (Bool newIsMinimized)
 Set a boolean value determining whether or not a window should be minimized. More...
 
Bool getIsMaximized () const
 Return a boolean value indicating whether or not a window is currently maximized. More...
 
Bool setIsMaximized (Bool newIsMaximized)
 Set a boolean value determining whether or not a window should be maximized. More...
 
Bool getIsFloating () const
 Return whether or not the window is floating (always in front of normal windows). More...
 
Bool setIsFloating (Bool newIsFloating)
 Set whether or not the window is floating (always in front of normal windows). More...
 
Bool getIsResizable () const
 Return whether or not the window is able to be resized by the GUI user. More...
 
void setIsResizable (Bool newIsResizable)
 Set whether or not the window is able to be resized by the GUI user. More...
 
Bool getIsMovable () const
 Return whether or not the window is able to be moved by the GUI user. More...
 
void setIsMovable (Bool newIsMovable)
 Set whether or not the window is able to be resized by the GUI user. More...
 
Bool getIsClosable () const
 Return whether or not the window is able to be closed by the GUI user. More...
 
void setIsClosable (Bool newIsClosable)
 Set whether or not the window is able to be closed by the GUI user. More...
 
Bool getIsFullscreen () const
 Return whether or not this graphics context window is in fullscreen mode. More...
 
Bool setIsFullscreen (Bool newIsFullscreen)
 Set whether or not this graphics context window is in fullscreen mode. More...
 
Bool setIsFullscreen (Bool newIsFullscreen, const Display &display)
 Set whether or not this graphics context window is in fullscreen mode. More...
 
gui::MenuBargetMenu () const
 Return a pointer to the window's menu. More...
 
Bool setMenu (gui::MenuBar *newMenu)
 Set a pointer to the menu of the window. More...
 
Bool startDrawing (const GraphicsDeviceType &deviceType, const RenderedPixelFormat &pixelFormat, const GraphicsContextFlags &flags)
 Start a background rendering thread for the context window that creates a context with the given attributes. More...
 
void stopDrawing ()
 A method called when the user want to stop the rendering thread for this window. More...
 
Bool isDrawing () const
 Return whether or not the context window is currently drawing. More...
 
const Shared< GraphicsDevice > & getDevice () const
 Return a pointer to the graphics device that is being used to render this window. More...
 
const Shared< GraphicsContext > & getContext () const
 Return a pointer to the graphics context that is being used to render this window. More...
 
const TimegetMinFrameTime () const
 Return the minimum time that can elapse between successive frames, acting as a framerate limiter. More...
 
void setMinFrameTime (const Time &newMinFrameTime)
 Set the minimum time that can elapse between successive frames, acting as a framerate limiter. More...
 
Float getMaxFrameRate () const
 Return the maximum frame rate at which this render window will be drawn. More...
 
void setMaxFrameRate (Float newMaxFrameRate)
 Return the maximum frame rate at which this render window will be drawn. More...
 
DelegategetDelegate ()
 Return an object that handles events for this context window. More...
 
const DelegategetDelegate () const
 Return an object that handles events for this context window. More...
 
void setDelegate (const Delegate &newDelegate)
 Set an object that handles events for this context window. More...
 
virtual void * getInternalPointer () const
 Return a pointer to the OS-specific object that represents this element. More...
 
- Public Member Functions inherited from om::graphics::gui::objects::GUIObject
 GUIObject ()
 Create a default visible GUI object positioned at the origin (0,0) with 0 width and 0 height. More...
 
 GUIObject (const RectangleStyle &newRectangleStyle)
 Create a visible GUI object positioned at the origin (0,0) with 0 width and 0 height and the given rectangle style. More...
 
 GUIObject (const Rectangle &newRectangle)
 Create a visible GUI object that occupies the specified rectangle. More...
 
 GUIObject (const Rectangle &newRectangle, const RectangleStyle &newRectangleStyle)
 Create a visible GUI object that occupies the specified rectangle and rectangle style. More...
 
virtual ~GUIObject ()
 Destory the GUI object, releasing all internal resources. More...
 
const RectanglegetRectangle () const
 Return a reference to this GUI object's rectangle. More...
 
const Vector3fgetSize () const
 Return a reference to the 3D size of this object along each of its local axes. More...
 
const Vector2fgetSizeXY () const
 Return a reference to the 2D scaling factor of this object along each of its local axes. More...
 
virtual Bool setSize (const Vector3f &newSize)
 Set the 3D size of this object along each of its local axes. More...
 
Bool setSize (const Vector2f &newSizeXY)
 Set the 2D size of this object along the X and Y local axes. More...
 
Bool setSize (Float newWidth, Float newHeight)
 Set the 2D size of this object along the X and Y local axes. More...
 
Bool setSizeX (Float newWidth)
 Set the size of this object along the X axis. More...
 
Bool setSizeY (Float newHeight)
 Set the size of this object along the Y axis. More...
 
Bool setSizeZ (Float newDepth)
 Set the size of this object along the Z axis. More...
 
virtual Bool resizeForContent ()
 Resize this object to fit tightly around its contents, if possible. More...
 
void fillParent (const Vector3f &parentSize)
 Resize and resposition this object so that it fills the specified parent bounding box size. More...
 
const Vector3fgetScale () const
 Return a reference to the 3D scaling factor of this object along each of its local axes. More...
 
const Vector2fgetScaleXY () const
 Return a reference to the 2D scaling factor of this object along each of its local axes. More...
 
virtual Bool setScale (const Vector3f &newScale)
 Set the 3D scaling factor of this object along each of its local axes. More...
 
Bool setScale (const Vector2f &newScaleXY)
 Set the 2D scaling factor of this object along the X and Y local axes. More...
 
Bool setScale (Float newScaleX, Float newScaleY)
 Set the 2D scaling factor of this object along the X and Y local axes. More...
 
Bool setScale (Float newScale)
 Set the scaling factor of this object along all 3 axes. More...
 
const Vector3fgetPosition () const
 Return the position of this GUI object's origin relative to its parent's coordinate origin. More...
 
const Vector2fgetPositionXY () const
 Return the 2D position of this GUI object's origin relative to its parent's coordinate origin. More...
 
Bool setPosition (const Vector2f &newPosition)
 Set the position of this GUI object's origin relative to its parent's coordinate origin. More...
 
virtual Bool setPosition (const Vector3f &newPosition)
 Set the position of this GUI object's origin relative to its parent's coordinate origin. More...
 
const Matrix3fgetRotation () const
 Return a 3x3 orthonormal matrix indicating the basis of this object's coordinate frame. More...
 
virtual Bool setRotation (const Matrix3f &newRotation)
 Set a 3x3 orthonormal matrix indicating the basis of this object's coordinate frame. More...
 
Bool setRotation (Float radians)
 Set the rotation of this GUI object to be along the Z-axis with a rotation specified in radians. More...
 
Bool setRotationDegrees (Float degrees)
 Set the rotation of this GUI object to be along the Z-axis with a rotation specified in degrees. More...
 
OrigingetOrigin ()
 Return the alignment of the coordinate origin for this object. More...
 
const OrigingetOrigin () const
 Return the alignment of the coordinate origin for this object. More...
 
virtual Bool setOrigin (const Origin &newPositionOrigin)
 Set the alignment of the coordinate origin for this object. More...
 
void setOrigin (Origin::XOrigin newXOrigin, Origin::YOrigin newYOrigin)
 Set the XY alignment of the coordinate origin for this object. More...
 
void setOrigin (Origin::XOrigin newXOrigin, Origin::YOrigin newYOrigin, Origin::ZOrigin newZOrigin)
 Set the XYZ alignment of the coordinate origin for this object. More...
 
AABB2f getBoundsInParent (const AABB2f &parentBounds) const
 Return the 2D bounding box of this object in the coordinate frame of the specified parent bounding box. More...
 
AABB3f getBoundsInParent (const AABB3f &parentBounds) const
 Return the 3D bounding box of this object in the coordinate frame of the specified parent bounding box. More...
 
AABB2f getLocalBoundsXY () const
 Return the 2D bounding box of this object in its local coordinate frame. More...
 
AABB3f getLocalBounds () const
 Return the 3D bounding box of this object in its local coordinate frame. More...
 
Vector2f getLocalCenterXY () const
 Return the 2D center of this object's rectangle in its local coordinate frame. More...
 
Vector3f getLocalCenter () const
 Return the 3D center of this object's rectangle in its local coordinate frame. More...
 
Matrix4f getTransformMatrix (const AABB3f &parentBounds) const
 Return the object-space-to-parent-space homogeneous transformation matrix for the given parent bounding box. More...
 
Vector2f transformToLocal (const Vector2f &pointInParent, const AABB2f &parentBounds) const
 Transform a 3D point in the parent coordinate system into this object's coordinate system. More...
 
Vector3f transformToLocal (const Vector3f &pointInParent, const AABB3f &parentBounds) const
 Transform a 3D point in the parent coordinate system into this object's coordinate system. More...
 
Vector2f transformFromLocal (const Vector2f &localPoint, const AABB2f &parentBounds) const
 Transform a 2D point in this object's local coordinate system into its parent's coordinate system. More...
 
Vector3f transformFromLocal (const Vector3f &localPoint, const AABB3f &parentBounds) const
 Transform a 3D point in this object's local coordinate system into its parent's coordinate system. More...
 
Vector2f transformVectorToLocal (const Vector2f &vectorInParent) const
 Transform a 3D vector in the parent coordinate system into this object's coordinate system. More...
 
Vector3f transformVectorToLocal (const Vector3f &vectorInParent) const
 Transform a 3D vector in the parent coordinate system into this object's coordinate system. More...
 
Vector2f transformVectorFromLocal (const Vector2f &localVector) const
 Transform a 2D vector in this object's local coordinate system into its parent's coordinate system. More...
 
Vector3f transformVectorFromLocal (const Vector3f &localVector) const
 Transform a 3D vector in this object's local coordinate system into its parent's coordinate system. More...
 
MouseButtonEvent transformEventToLocal (const MouseButtonEvent &event, const AABB2f &parentBounds) const
 Transform a mouse button event in the parent coordinate system into this object's coordinate system. More...
 
MouseButtonEvent transformEventFromLocal (const MouseButtonEvent &event, const AABB2f &parentBounds) const
 Transform a mouse button event in this object's local coordinate system into its parent's coordinate system. More...
 
MouseMotionEvent transformEventToLocal (const MouseMotionEvent &event, const AABB2f &parentBounds) const
 Transform a mouse motion event in the parent coordinate system into this object's coordinate system. More...
 
MouseMotionEvent transformEventFromLocal (const MouseMotionEvent &event, const AABB2f &parentBounds) const
 Transform a mouse motion event in this object's local coordinate system into its parent's coordinate system. More...
 
MouseWheelEvent transformEventToLocal (const MouseWheelEvent &event, const AABB2f &parentBounds) const
 Transform a mouse wheel event in the parent coordinate system into this object's coordinate system. More...
 
MouseWheelEvent transformEventFromLocal (const MouseWheelEvent &event, const AABB2f &parentBounds) const
 Transform a mouse wheel event in this object's local coordinate system into its parent's coordinate system. More...
 
virtual Bool containsLocalPoint (const Vector2f &localPoint) const
 Return whether or not this GUI object contains the specified local 2D point within its local bounds. More...
 
virtual Bool containsLocalPoint (const Vector3f &localPoint) const
 Return whether or not this GUI object contains the specified local 3D point within its local bounds. More...
 
AABB2f getLocalContentBoundsXY () const
 Return the 2D bounding box for the object's rectangle inside area in its local coordinate frame. More...
 
virtual AABB3f getLocalContentBounds () const
 Return the 3D bounding box for the object's rectangle inside area in its local coordinate frame. More...
 
GUIStylegetStyle () const
 Return a pointer to the style object to use when drawing this GUI object. More...
 
void setStyle (GUIStyle *newStyle)
 Set a pointer to the style object to use when drawing this GUI object. More...
 
const RectangleStylegetRectangleStyle () const
 Return an object that describes the style of the main outside rectangle of this object. More...
 
virtual Bool setRectangleStyle (const RectangleStyle &newRectangleStyle)
 Set an object that describes the style of the main outside rectangle of this object. More...
 
const BordergetBorder () const
 Return an object that describes the border for this object's main rectangle. More...
 
virtual Bool setBorder (const Border &newBorder)
 Set an object that describes the border for this object's main rectangle. More...
 
Float getBorderWidth () const
 Return the width of this object's main rectangle border. More...
 
Bool setBorderWidth (Float newWidth)
 Set the width of this object's main rectangle border. More...
 
Float getBorderRadius () const
 Return the corner radius of this object's main rectangle border. More...
 
Bool setBorderRadius (Float newRadius)
 Set the corner radius of this object's main rectangle border. More...
 
const MargingetBorderMargin () const
 Return an object that describes the padding between the exterior and interior of the object's main rectangle. More...
 
Bool setBorderMargin (const Margin &newMargin)
 Set an object that describes the padding between the exterior and interior of the object's main rectangle. More...
 
const Color4f & getBackgroundColor () const
 Return the background color for this object's main rectangle. More...
 
virtual Bool setBackgroundColor (const Color4f &newBackgroundColor)
 Set the background color for this object's main rectangle. More...
 
const Color4f & getBorderColor () const
 Return the border color used when rendering the object's main rectangle. More...
 
virtual Bool setBorderColor (const Color4f &newBorderColor)
 Set the border color used when rendering the object's main rectangle. More...
 
const GUIObjectFlagsgetFlags () const
 Return a const reference to the flags for this GUI object. More...
 
Bool flagIsSet (GUIObjectFlags::Flag flag) const
 Return whether or not the specified boolan flag is set for this GUI object. More...
 
virtual Bool setFlags (const GUIObjectFlags &newFlags)
 Set the flags for this GUI object. More...
 
Bool setFlag (GUIObjectFlags::Flag flag, Bool newIsSet=true)
 Set whether or not the specified boolan flag is set for this GUI object. More...
 
Bool getIsVisible () const
 Return whether or not this GUI object should be drawn to the screen. More...
 
void setIsVisible (Bool newIsVisible)
 Set whether or not this GUI object should be drawn to the screen. More...
 
Bool hasFocus () const
 Return whether or not this GUI object currently has keyboard focus at its level in the GUI hierarchy. More...
 
virtual Bool setFocus (Bool newHasFocus)
 Set whether or not this GUI object currently has keyboard focus at its level in the GUI hierarchy. More...
 
virtual void update (Float dt)
 Update the current internal state of this object for the specified time interval in seconds. More...
 
virtual Bool drawSelf (GUIRenderer &renderer, const AABB3f &parentBounds) const
 Draw this object using the specified GUI renderer to the given parent coordinate system bounds. More...
 
- Public Member Functions inherited from om::gui::input::InputHandler
virtual ~InputHandler ()
 Destroy an input handler. More...
 
virtual Bool guiEvent (const GUIEvent &event)
 Handle the specified GUI event that occured when this object had focus. More...
 
virtual Bool textEvent (const TextEvent &event)
 Handle the specified text input event that occured when this object had focus. More...
 
virtual Bool keyEvent (const KeyEvent &event)
 Handle the specified keyboard event that occured when this object had focus. More...
 
virtual Bool mouseButtonEvent (const MouseButtonEvent &event)
 Handle the specified mouse button event that occurred. More...
 
virtual Bool mouseMotionEvent (const MouseMotionEvent &event)
 Handle the specified mouse motion event that occurred. More...
 
virtual Bool mouseWheelEvent (const MouseWheelEvent &event)
 Handle the specified mouse wheel event that occurred. More...
 

Detailed Description

A class that facilitates creation of a simple graphics rendering context in a native GUI window.

Constructor & Destructor Documentation

om::graphics::devices::GraphicsContextWindow::GraphicsContextWindow ( const UTF8String &  title,
const Size2D size 
)

Create a centered graphics context window with the specified size.

om::graphics::devices::GraphicsContextWindow::GraphicsContextWindow ( const UTF8String &  title,
const Size2D size,
const Vector2i position 
)

Create a centered graphics context window with the specified size and position.

om::graphics::devices::GraphicsContextWindow::~GraphicsContextWindow ( )

Destroy this context window, releasing all non-shared resources.

This destructor automatically stops the drawing thread and releases the graphics context for the window.

Member Function Documentation

gui::Window* om::graphics::devices::GraphicsContextWindow::getWindow ( )
inline

Return a pointer to the underlying window of this graphics context window.

const gui::Window* om::graphics::devices::GraphicsContextWindow::getWindow ( ) const
inline

Return a const pointer to the underlying window of this graphics context window.

Size2D om::graphics::devices::GraphicsContextWindow::getFrameSize ( ) const
inline

Return the size in pixels of this graphics context window's outside area (including title bar, frame).

Size2D om::graphics::devices::GraphicsContextWindow::getContentSize ( ) const
inline

Return the size in pixels of this graphics context window's content area.

Bool om::graphics::devices::GraphicsContextWindow::setContentSize ( const Size2D newSize)
inline

Set the size in pixels of this graphics context window's content area.

The method returns whether or not the window size was able to be changed. The GraphicsContextView the window is using is automatically resized to match.

If you wish to provide alternate behavior, override the method in a subclass.

Vector2i om::graphics::devices::GraphicsContextWindow::getPosition ( ) const
inline

Get the position of the window relative to the top left corner of the screen (in pixels).

Bool om::graphics::devices::GraphicsContextWindow::setPosition ( const Vector2i position)
inline

Set the position of the window relative to the top left corner of the screen (in pixels).

Bool om::graphics::devices::GraphicsContextWindow::center ( )
inline

Center the window within the screen where it currently resides.

UTF8String om::graphics::devices::GraphicsContextWindow::getTitle ( ) const
inline

Return the title string for this window.

Bool om::graphics::devices::GraphicsContextWindow::setTitle ( const UTF8String &  newTitle)
inline

Set the title string for this window.

Bool om::graphics::devices::GraphicsContextWindow::moveToFront ( )
inline

Move the window to the front of the window order (in it's level) within an application.

Bool om::graphics::devices::GraphicsContextWindow::moveToBack ( )
inline

Move the window to the back of the window order, beneath all windows but the desktop.

Bool om::graphics::devices::GraphicsContextWindow::getIsVisible ( ) const
inline

Return whether or not the window is currently visible.

Bool om::graphics::devices::GraphicsContextWindow::setIsVisible ( Bool  newIsVisible)
inline

Set whether or not the window should be visible.

Bool om::graphics::devices::GraphicsContextWindow::getIsMinimized ( ) const
inline

Return a boolean value indicating whether or not a window is currently minimized.

Bool om::graphics::devices::GraphicsContextWindow::setIsMinimized ( Bool  newIsMinimized)
inline

Set a boolean value determining whether or not a window should be minimized.

Bool om::graphics::devices::GraphicsContextWindow::getIsMaximized ( ) const
inline

Return a boolean value indicating whether or not a window is currently maximized.

Bool om::graphics::devices::GraphicsContextWindow::setIsMaximized ( Bool  newIsMaximized)
inline

Set a boolean value determining whether or not a window should be maximized.

Bool om::graphics::devices::GraphicsContextWindow::getIsFloating ( ) const
inline

Return whether or not the window is floating (always in front of normal windows).

Bool om::graphics::devices::GraphicsContextWindow::setIsFloating ( Bool  newIsFloating)
inline

Set whether or not the window is floating (always in front of normal windows).

Bool om::graphics::devices::GraphicsContextWindow::getIsResizable ( ) const
inline

Return whether or not the window is able to be resized by the GUI user.

void om::graphics::devices::GraphicsContextWindow::setIsResizable ( Bool  newIsResizable)
inline

Set whether or not the window is able to be resized by the GUI user.

Bool om::graphics::devices::GraphicsContextWindow::getIsMovable ( ) const
inline

Return whether or not the window is able to be moved by the GUI user.

void om::graphics::devices::GraphicsContextWindow::setIsMovable ( Bool  newIsMovable)
inline

Set whether or not the window is able to be resized by the GUI user.

Bool om::graphics::devices::GraphicsContextWindow::getIsClosable ( ) const
inline

Return whether or not the window is able to be closed by the GUI user.

void om::graphics::devices::GraphicsContextWindow::setIsClosable ( Bool  newIsClosable)
inline

Set whether or not the window is able to be closed by the GUI user.

Bool om::graphics::devices::GraphicsContextWindow::getIsFullscreen ( ) const
inline

Return whether or not this graphics context window is in fullscreen mode.

Bool om::graphics::devices::GraphicsContextWindow::setIsFullscreen ( Bool  newIsFullscreen)

Set whether or not this graphics context window is in fullscreen mode.

Bool om::graphics::devices::GraphicsContextWindow::setIsFullscreen ( Bool  newIsFullscreen,
const Display display 
)

Set whether or not this graphics context window is in fullscreen mode.

gui::MenuBar* om::graphics::devices::GraphicsContextWindow::getMenu ( ) const
inline

Return a pointer to the window's menu.

Bool om::graphics::devices::GraphicsContextWindow::setMenu ( gui::MenuBar newMenu)
inline

Set a pointer to the menu of the window.

Bool om::graphics::devices::GraphicsContextWindow::startDrawing ( const GraphicsDeviceType deviceType,
const RenderedPixelFormat pixelFormat,
const GraphicsContextFlags flags 
)
inline

Start a background rendering thread for the context window that creates a context with the given attributes.

The user provides an output pixel format, and configuration flags for the new graphics context.

The method returns whether or not drawing was able to be started successfully. The method may fail if there are no suitable graphics devices, the graphics context was unable to created, or if some other error occurred.

void om::graphics::devices::GraphicsContextWindow::stopDrawing ( )
inline

A method called when the user want to stop the rendering thread for this window.

Bool om::graphics::devices::GraphicsContextWindow::isDrawing ( ) const
inline

Return whether or not the context window is currently drawing.

const Shared<GraphicsDevice>& om::graphics::devices::GraphicsContextWindow::getDevice ( ) const
inline

Return a pointer to the graphics device that is being used to render this window.

If the method returns a NULL pointer, either the drawing thread is not running, or device creation failed.

const Shared<GraphicsContext>& om::graphics::devices::GraphicsContextWindow::getContext ( ) const
inline

Return a pointer to the graphics context that is being used to render this window.

If the method returns a NULL pointer, either the drawing thread is not running, or context creation failed. Using the context from any other thread than the drawing thread will result in undefined behavior.

const Time& om::graphics::devices::GraphicsContextWindow::getMinFrameTime ( ) const
inline

Return the minimum time that can elapse between successive frames, acting as a framerate limiter.

This is used to save CPU and GPU time when rendering interfaces that don't need to be updated as fast as the system can.

The default minimum frame time is 1/60th of a second, equivalent to a maximum frame rate of 60fps.

void om::graphics::devices::GraphicsContextWindow::setMinFrameTime ( const Time newMinFrameTime)
inline

Set the minimum time that can elapse between successive frames, acting as a framerate limiter.

This is used to save CPU and GPU time when rendering interfaces that don't need to be updated as fast as the system can.

The default minimum frame time is 1/60th of a second, equivalent to a maximum frame rate of 60fps.

Float om::graphics::devices::GraphicsContextWindow::getMaxFrameRate ( ) const
inline

Return the maximum frame rate at which this render window will be drawn.

This is used to save CPU and GPU time when rendering interfaces that don't need to be updated as fast as the system can.

The default maximum frame rate is 60fps.

void om::graphics::devices::GraphicsContextWindow::setMaxFrameRate ( Float  newMaxFrameRate)
inline

Return the maximum frame rate at which this render window will be drawn.

This is used to save CPU and GPU time when rendering interfaces that don't need to be updated as fast as the system can.

If the specified maximum frame rate is less than or equal to zero, the maximum frame rate is set to infinity.

The default maximum frame rate is 60fps.

Delegate& om::graphics::devices::GraphicsContextWindow::getDelegate ( )
inline

Return an object that handles events for this context window.

const Delegate& om::graphics::devices::GraphicsContextWindow::getDelegate ( ) const
inline

Return an object that handles events for this context window.

void om::graphics::devices::GraphicsContextWindow::setDelegate ( const Delegate newDelegate)
inline

Set an object that handles events for this context window.

virtual void* om::graphics::devices::GraphicsContextWindow::getInternalPointer ( ) const
virtual

Return a pointer to the OS-specific object that represents this element.


The documentation for this class was generated from the following file: