OGRE-Next  4.0.0unstable
Object-Oriented Graphics Rendering Engine
Ogre::VulkanWin32Window Class Referencefinal

#include <OgreVulkanWin32Window.h>

+ Inheritance diagram for Ogre::VulkanWin32Window:

Public Member Functions

 VulkanWin32Window (const String &title, uint32 width, uint32 height, bool fullscreenMode)
 
 ~VulkanWin32Window () override
 
void _initialize (TextureGpuManager *textureGpuManager, const NameValuePairList *miscParams) override
 
void _setVisible (bool visible) override
 Internal method to notify the window it has been obscured or minimized. More...
 
void destroy () override
 
void getCustomAttribute (IdString name, void *pData)
 
bool isHidden () const override
 Indicates whether the window was set to hidden (not displayed) More...
 
bool isVisible () const override
 
void reposition (int32 left, int32 top) override
 
void requestFullscreenSwitch (bool goFullscreen, bool borderless, uint32 monitorIdx, uint32 width, uint32 height, uint32 frequencyNumerator, uint32 frequencyDenominator) override
 Requests to toggle between fullscreen and windowed mode. More...
 
void requestResolution (uint32 width, uint32 height) override
 Requests a change in resolution. More...
 
void setFocused (bool focused) override
 
void setHidden (bool hidden) override
 Hide (or show) the window. More...
 
void windowMovedOrResized () override
 Notify that the window has been resized. More...
 
- Public Member Functions inherited from Ogre::VulkanWindowSwapChainBased
 VulkanWindowSwapChainBased (const String &title, uint32 width, uint32 height, bool fullscreenMode)
 
 ~VulkanWindowSwapChainBased () override
 
void _swapBuffers (VkSemaphore queueFinishSemaphore)
 Actually performs present. More...
 
void acquireNextSwapchain ()
 
bool canDownloadData () const override
 Returns true if you can download to CPU (i.e. More...
 
PixelFormatGpu chooseSurfaceFormat (bool hwGamma)
 
virtual void createSwapchain ()
 
virtual void destroySwapchain ()
 
VkSemaphore getImageAcquiredSemaphore ()
 Returns null if getImageAcquiredSemaphore has already been called during this frame. More...
 
size_t getNumSwapchains () const
 
VkImage getSwapchainImage (size_t idx) const
 
bool isClosed () const override
 Indicates whether the window has been closed by the user. More...
 
void parseSharedParams (const NameValuePairList *miscParams)
 
void setVSync (bool vSync, uint32 vSyncInterval) override
 Turns VSync on/off. More...
 
void setWantsToDownload (bool bWantsToDownload) override
 On Metal you must call this function and set it to true in order to take pictures. More...
 
void swapBuffers () override
 Tells our VulkanDevice that the next commitAndNextCommandBuffer call should present us Calling swapBuffers during the command buffer that is rendering to us is key for good performance; otherwise Ogre may split the commands that render to this window and the command that presents this window into two queue submissions. More...
 
- Public Member Functions inherited from Ogre::VulkanWindow
 VulkanWindow (const String &title, uint32 width, uint32 height, bool fullscreenMode)
 
void _initialize (TextureGpuManager *textureGpuManager) override
 
virtual void _initialize (TextureGpuManager *textureGpuManager, const NameValuePairList *ogre_nullable miscParams)=0
 
void _setDevice (VulkanDevice *device)
 
- Public Member Functions inherited from Ogre::Window
 Window (const String &title, uint32 widthPt, uint32 heightPt, bool fullscreenMode)
 
virtual ~Window ()
 
void _setPrimary ()
 Indicates that this is the primary window. More...
 
bool getBorderless () const
 
TextureGpu *ogre_nullable getDepthBuffer () const
 
uint32 getFrequencyDenominator () const
 
uint32 getFrequencyNumerator () const
 
uint32 getHeight () 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 () const
 
uint32 getRequestedHeightPt () const
 
uint32 getRequestedWidthPt () const
 
SampleDescription getSampleDescription () const
 
TextureGpu *ogre_nullable getStencilBuffer () const
 
TextureGpu *ogre_nullable getTexture () const
 WARNING: Attempting to change the TextureGpu (e.g. More...
 
const StringgetTitle () 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 () const
 
uint32 getVSyncInterval () const
 
uint32 getWidth () const
 
bool isFocused () const
 
bool isFullscreen () const
 Returns true if we are currently in fullscreen mode. More...
 
virtual bool isManualSwapRelease () const
 Returns the value set by setManualSwapRelease when supported. More...
 
bool isMultisample () const
 
bool isPrimary () const
 
virtual void performManualRelease ()
 See Window::setManualSwapRelease. More...
 
virtual void setBorderless (bool borderless)
 
virtual void setFsaa (const String &fsaa)
 Set the FSAA mode to be used if hardware support it. More...
 
virtual void setManualSwapRelease (bool bManualRelease)
 Metal doesn't want us to hold on to a drawable after presenting. More...
 
virtual void setTitle (const String &title)
 
bool wantsToGoFullscreen () const
 Returns true if we are in windowed mode right now, but want to go fullscreen. More...
 
bool wantsToGoWindowed () const
 Returns true if we are in fullscreen mode right now, but want to go windowed mode. More...
 

Static Public Member Functions

static const char * getRequiredExtensionName ()
 

Additional Inherited Members

- Public Types inherited from Ogre::VulkanWindowSwapChainBased
enum  Backend { BackendX11 = 1u << 0u }
 
enum  SwapchainStatus { SwapchainAcquired , SwapchainUsedInRendering , SwapchainPendingSwap , SwapchainReleased }
 
- Public Attributes inherited from Ogre::VulkanWindowSwapChainBased
bool mCanDownloadData
 
bool mClosed
 
bool mEnablePreTransform
 
bool mLowestLatencyVSync
 
bool mRebuildingSwapchain
 
bool mSuboptimal
 
VkSurfaceKHR mSurfaceKHR
 
VkSwapchainKHR mSwapchain
 
FastArray< VkImage > mSwapchainImages
 
VkSemaphore mSwapchainSemaphore
 Note: We need a semaphore per frame, not per swapchain. More...
 
SwapchainStatus mSwapchainStatus
 

Constructor & Destructor Documentation

◆ VulkanWin32Window()

Ogre::VulkanWin32Window::VulkanWin32Window ( const String title,
uint32  width,
uint32  height,
bool  fullscreenMode 
)

◆ ~VulkanWin32Window()

Ogre::VulkanWin32Window::~VulkanWin32Window ( )
override

Member Function Documentation

◆ _initialize()

void Ogre::VulkanWin32Window::_initialize ( TextureGpuManager textureGpuManager,
const NameValuePairList miscParams 
)
override

◆ _setVisible()

void Ogre::VulkanWin32Window::_setVisible ( bool  visible)
overridevirtual

Internal method to notify the window it has been obscured or minimized.

Implements Ogre::Window.

◆ destroy()

void Ogre::VulkanWin32Window::destroy ( )
overridevirtual

Reimplemented from Ogre::VulkanWindowSwapChainBased.

◆ getCustomAttribute()

void Ogre::VulkanWin32Window::getCustomAttribute ( IdString  name,
void *  pData 
)
virtual

Reimplemented from Ogre::VulkanWindowSwapChainBased.

◆ getRequiredExtensionName()

static const char* Ogre::VulkanWin32Window::getRequiredExtensionName ( )
static

◆ isHidden()

bool Ogre::VulkanWin32Window::isHidden ( ) const
overridevirtual

Indicates whether the window was set to hidden (not displayed)

Implements Ogre::Window.

◆ isVisible()

bool Ogre::VulkanWin32Window::isVisible ( ) const
overridevirtual

Implements Ogre::Window.

◆ reposition()

void Ogre::VulkanWin32Window::reposition ( int32  left,
int32  top 
)
overridevirtual

Implements Ogre::Window.

◆ requestFullscreenSwitch()

void Ogre::VulkanWin32Window::requestFullscreenSwitch ( bool  goFullscreen,
bool  borderless,
uint32  monitorIdx,
uint32  widthPt,
uint32  heightPt,
uint32  frequencyNumerator,
uint32  frequencyDenominator 
)
overridevirtual

Requests to toggle between fullscreen and windowed mode.

Remarks
Use wantsToGoFullscreen & wantsToGoWindowed to know what you've requested. Same remarks as requestResolution apply: If we request to go fullscreen, wantsToGoFullscreen will return true. But if get word from OS saying we stay in windowed mode, wantsToGoFullscreen will start returning false.
Parameters
goFullscreenTrue to go fullscreen, false to go windowed mode.
borderlessWhether to be borderless. Only useful if goFullscreen == false;
monitorIdx
widthPtNew width. Leave 0 if you don't care.
heightPtNew height. Leave 0 if you don't care.
frequencyNumeratorNew frequency (fullscreen only). Leave 0 if you don't care.
frequencyDenominatorNew frequency (fullscreen only). Leave 0 if you don't care.

Reimplemented from Ogre::Window.

◆ requestResolution()

void Ogre::VulkanWin32Window::requestResolution ( uint32  widthPt,
uint32  heightPt 
)
overridevirtual

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 from Ogre::Window.

◆ setFocused()

void Ogre::VulkanWin32Window::setFocused ( bool  focused)
overridevirtual

Reimplemented from Ogre::Window.

◆ setHidden()

void Ogre::VulkanWin32Window::setHidden ( bool  hidden)
overridevirtual

Hide (or show) the window.

If called with hidden=true, this will make the window completely invisible to the user.

Remarks
Setting a window to hidden is useful to create a dummy primary RenderWindow hidden from the user so that you can create and recreate your actual RenderWindows without having to recreate all your resources.

Implements Ogre::Window.

◆ windowMovedOrResized()

void Ogre::VulkanWin32Window::windowMovedOrResized ( )
overridevirtual

Notify that the window has been resized.

Remarks
You don't need to call this unless you created the window externally.

Reimplemented from Ogre::Window.


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