OGRE
2.2.4
Object-Oriented Graphics Rendering Engine
|
#include <OgreWindow.h>
Public Member Functions | |
Window (const String &title, uint32 widthPt, uint32 heightPt, bool fullscreenMode) | |
virtual | ~Window () |
virtual void | _initialize (TextureGpuManager *textureGpuManager)=0 |
void | _setPrimary (void) |
Indicates that this is the primary window. More... | |
virtual void | _setVisible (bool visible)=0 |
Internal method to notify the window it has been obscured or minimized. More... | |
virtual void | destroy (void)=0 |
bool | getBorderless (void) const |
virtual void | getCustomAttribute (IdString name, void *pData) |
TextureGpu * | getDepthBuffer (void) const |
uint32 | getFrequencyDenominator (void) const |
uint32 | getFrequencyNumerator (void) const |
uint32 | getHeight (void) const |
virtual void | getMetrics (uint32 &width, uint32 &height, int32 &left, int32 &top) const |
Overloaded version of getMetrics from RenderTarget, including extra details specific to windowing systems. More... | |
PixelFormatGpu | getPixelFormat (void) const |
uint32 | getRequestedHeightPt (void) const |
uint32 | getRequestedWidthPt (void) const |
SampleDescription | getSampleDescription (void) const |
TextureGpu * | getStencilBuffer (void) const |
TextureGpu * | getTexture (void) const |
WARNING: Attempting to change the TextureGpu (e.g. More... | |
const String & | getTitle (void) const |
virtual float | getViewPointToPixelScale () const |
Many windowing systems that support HiDPI displays use special points to specify size of the windows and controls, so that windows and controls with hardcoded sizes does not become too small on HiDPI displays. More... | |
bool | getVSync (void) const |
uint32 | getVSyncInterval (void) const |
uint32 | getWidth (void) const |
virtual bool | isClosed (void) const =0 |
Indicates whether the window has been closed by the user. More... | |
bool | isFocused (void) const |
bool | isFullscreen (void) const |
Returns true if we are currently in fullscreen mode. More... | |
virtual bool | isHidden (void) const =0 |
Indicates whether the window was set to hidden (not displayed) More... | |
bool | isMultisample (void) const |
bool | isPrimary (void) const |
virtual bool | isVisible (void) const =0 |
void | operator delete (void *ptr) |
void | operator delete (void *ptr, void *) |
void | operator delete (void *ptr, const char *, int, const char *) |
void | operator delete[] (void *ptr) |
void | operator delete[] (void *ptr, const char *, int, const char *) |
void * | operator new (size_t sz, const char *file, int line, const char *func) |
operator new, with debug line info More... | |
void * | operator new (size_t sz) |
void * | operator new (size_t sz, void *ptr) |
placement operator new More... | |
void * | operator new[] (size_t sz, const char *file, int line, const char *func) |
array operator new, with debug line info More... | |
void * | operator new[] (size_t sz) |
virtual void | reposition (int32 leftPt, int32 topPt)=0 |
virtual void | requestFullscreenSwitch (bool goFullscreen, bool borderless, uint32 monitorIdx, uint32 widthPt, uint32 heightPt, uint32 frequencyNumerator, uint32 frequencyDenominator) |
Requests to toggle between fullscreen and windowed mode. More... | |
virtual void | requestResolution (uint32 widthPt, uint32 heightPt) |
Requests a change in resolution. More... | |
virtual void | setBorderless (bool borderless) |
virtual void | setFocused (bool focused) |
virtual void | setFsaa (const String &fsaa) |
Set the FSAA mode to be used if hardware support it. More... | |
virtual void | setHidden (bool hidden)=0 |
Hide (or show) the window. More... | |
virtual void | setTitle (const String &title) |
virtual void | setVSync (bool vSync, uint32 vSyncInterval) |
virtual void | swapBuffers (void)=0 |
bool | wantsToGoFullscreen (void) const |
Returns true if we are in windowed mode right now, but want to go fullscreen. More... | |
bool | wantsToGoWindowed (void) const |
Returns true if we are in fullscreen mode right now, but want to go windowed mode. More... | |
virtual void | windowMovedOrResized (void) |
Notify that the window has been resized. More... | |
|
virtual |
|
pure virtual |
Implemented in Ogre::D3D11WindowSwapChainBased, Ogre::Win32Window, Ogre::MetalWindow, Ogre::GLXWindow, and Ogre::NULLWindow.
void Ogre::Window::_setPrimary | ( | void | ) |
Indicates that this is the primary window.
Only to be called by Ogre::Root
|
pure virtual |
Internal method to notify the window it has been obscured or minimized.
Implemented in Ogre::Win32Window, Ogre::GLXWindow, Ogre::MetalWindow, Ogre::D3D11Window, and Ogre::NULLWindow.
|
pure virtual |
Implemented in Ogre::D3D11WindowSwapChainBased, Ogre::Win32Window, Ogre::GLXWindow, Ogre::MetalWindow, Ogre::D3D11Window, and Ogre::NULLWindow.
bool Ogre::Window::getBorderless | ( | void | ) | const |
|
inlinevirtual |
Reimplemented in Ogre::GLXWindow, Ogre::Win32Window, Ogre::MetalWindow, and Ogre::D3D11Window.
TextureGpu* Ogre::Window::getDepthBuffer | ( | void | ) | const |
uint32 Ogre::Window::getFrequencyDenominator | ( | void | ) | const |
uint32 Ogre::Window::getFrequencyNumerator | ( | void | ) | const |
uint32 Ogre::Window::getHeight | ( | void | ) | const |
|
virtual |
Overloaded version of getMetrics from RenderTarget, including extra details specific to windowing systems.
Result is in pixels.
PixelFormatGpu Ogre::Window::getPixelFormat | ( | void | ) | const |
uint32 Ogre::Window::getRequestedHeightPt | ( | void | ) | const |
uint32 Ogre::Window::getRequestedWidthPt | ( | void | ) | const |
SampleDescription Ogre::Window::getSampleDescription | ( | void | ) | const |
TextureGpu* Ogre::Window::getStencilBuffer | ( | void | ) | const |
TextureGpu* Ogre::Window::getTexture | ( | void | ) | const |
WARNING: Attempting to change the TextureGpu (e.g.
setResolution, setPixelFormat) is undefined behavior
const String& Ogre::Window::getTitle | ( | void | ) | const |
|
inlinevirtual |
Many windowing systems that support HiDPI displays use special points to specify size of the windows and controls, so that windows and controls with hardcoded sizes does not become too small on HiDPI displays.
Such points have constant density ~ 100 points per inch (probably 96 on Windows and 72 on Mac), that is independent of pixel density of real display, and are used through the all windowing system.
Sometimes, such view points are choosen bigger for output devices that are viewed from larger distances, like 30" TV comparing to 30" monitor, therefore maintaining constant points angular density rather than constant linear density.
In any case, all such windowing system provides the way to convert such view points to pixels, be it DisplayProperties::LogicalDpi on WinRT or backingScaleFactor on MacOSX. We use pixels consistently through the Ogre, but window/view management functions takes view points for convenience, as does the rest of windowing system. Such parameters are named using xxxxPt pattern, and should not be mixed with pixels without being converted using getViewPointToPixelScale() function.
Sometimes such scale factor can change on-the-fly, for example if window is dragged to monitor with different DPI. In such situation, window size in view points is usually preserved by windowing system, and Ogre should adjust pixel size of RenderWindow.
Reimplemented in Ogre::MetalWindow.
bool Ogre::Window::getVSync | ( | void | ) | const |
uint32 Ogre::Window::getVSyncInterval | ( | void | ) | const |
uint32 Ogre::Window::getWidth | ( | void | ) | const |
|
pure virtual |
Indicates whether the window has been closed by the user.
Implemented in Ogre::Win32Window, Ogre::MetalWindow, Ogre::GLXWindow, Ogre::D3D11Window, and Ogre::NULLWindow.
bool Ogre::Window::isFocused | ( | void | ) | const |
bool Ogre::Window::isFullscreen | ( | void | ) | const |
Returns true if we are currently in fullscreen mode.
|
pure virtual |
Indicates whether the window was set to hidden (not displayed)
Implemented in Ogre::Win32Window, Ogre::GLXWindow, Ogre::MetalWindow, Ogre::D3D11Window, and Ogre::NULLWindow.
bool Ogre::Window::isMultisample | ( | void | ) | const |
bool Ogre::Window::isPrimary | ( | void | ) | const |
|
pure virtual |
Implemented in Ogre::Win32Window, Ogre::GLXWindow, Ogre::MetalWindow, and Ogre::NULLWindow.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
operator new, with debug line info
|
inlineinherited |
|
inlineinherited |
placement operator new
|
inlineinherited |
array operator new, with debug line info
|
inlineinherited |
Implemented in Ogre::Win32Window, Ogre::MetalWindow, Ogre::D3D11Window, Ogre::GLXWindow, and Ogre::NULLWindow.
|
virtual |
Requests to toggle between fullscreen and windowed mode.
goFullscreen | True to go fullscreen, false to go windowed mode. |
borderless | Whether to be borderless. Only useful if goFullscreen == false; |
monitorIdx | |
width | New width. Leave 0 if you don't care. |
height | New height. Leave 0 if you don't care. |
frequencyNumerator | New frequency (fullscreen only). Leave 0 if you don't care. |
frequencyDenominator | New frequency (fullscreen only). Leave 0 if you don't care. |
Reimplemented in Ogre::Win32Window, Ogre::GLXWindow, and Ogre::NULLWindow.
Requests a change in resolution.
Change is not immediate. Use getRequestedWidthPt & getRequestedHeightPt if you need to know what you've requested, but beware you may not get that resolution, and once we get word from the OS, getRequested{Width/Height}Pt will change again so that getWidth == getRequestedWidthPt * getViewPointToPixelScale.
Reimplemented in Ogre::GLXWindow, Ogre::Win32Window, Ogre::MetalWindow, and Ogre::NULLWindow.
|
virtual |
|
virtual |
Reimplemented in Ogre::Win32Window.
|
inlinevirtual |
Set the FSAA mode to be used if hardware support it.
This option will be ignored if the hardware does not support it or setting can not be changed on the fly on per-target level.
fsaa | Requesed FSAA mode ( |
Reimplemented in Ogre::D3D11WindowSwapChainBased.
|
pure virtual |
Hide (or show) the window.
If called with hidden=true, this will make the window completely invisible to the user.
Implemented in Ogre::Win32Window, Ogre::GLXWindow, Ogre::MetalWindow, Ogre::D3D11Window, and Ogre::NULLWindow.
|
virtual |
|
virtual |
Reimplemented in Ogre::Win32Window, and Ogre::GLXWindow.
|
pure virtual |
Implemented in Ogre::D3D11WindowSwapChainBased, Ogre::GLXWindow, Ogre::Win32Window, Ogre::MetalWindow, and Ogre::NULLWindow.
bool Ogre::Window::wantsToGoFullscreen | ( | void | ) | const |
Returns true if we are in windowed mode right now, but want to go fullscreen.
bool Ogre::Window::wantsToGoWindowed | ( | void | ) | const |
Returns true if we are in fullscreen mode right now, but want to go windowed mode.
|
inlinevirtual |
Notify that the window has been resized.
Reimplemented in Ogre::GLXWindow, Ogre::Win32Window, and Ogre::MetalWindow.