vsg  1.0.4
VulkanSceneGraph library
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
vsg::WindowAdapter Class Reference

#include <WindowAdapter.h>

Inheritance diagram for vsg::WindowAdapter:
Inheritance graph
[legend]
Collaboration diagram for vsg::WindowAdapter:
Collaboration graph
[legend]

Public Member Functions

 WindowAdapter (ref_ptr< Surface > surface, ref_ptr< WindowTraits > traits)
 
 WindowAdapter (const Window &)=delete
 
WindowAdapteroperator= (const Window &)=delete
 
const char * instanceExtensionSurfaceName () const override
 
bool visible () const override
 
bool valid () const override
 
void resize () override
 
void updateExtents (uint32_t width, uint32_t height)
 update the WindowAdapter::_extents and set windowResize to true
 
VkExtent2D & extent2D ()
 
- Public Member Functions inherited from vsg::Inherit< Window, WindowAdapter >
 Inherit (Args &&... args)
 
std::size_t sizeofObject () const noexcept override
 
const char * className () const noexcept override
 
const std::type_info & type_info () const noexcept override
 
bool is_compatible (const std::type_info &type) const noexcept override
 
int compare (const Object &rhs) const override
 
void accept (Visitor &visitor) override
 
void accept (ConstVisitor &visitor) const override
 
void accept (RecordTraversal &visitor) const override
 
- Public Member Functions inherited from vsg::Window
 Window (const Window &)=delete
 
Windowoperator= (const Window &)=delete
 
virtual void releaseWindow ()
 
virtual void releaseConnection ()
 
virtual bool pollEvents (UIEvents &events)
 get the list of events since the last poolEvents() call by splicing bufferEvents with polled windowing events.
 
ref_ptr< WindowTraitstraits ()
 
const ref_ptr< WindowTraitstraits () const
 
const VkExtent2D & extent2D () const
 
VkClearColorValue & clearColor ()
 
const VkClearColorValue & clearColor () const
 
VkSurfaceFormatKHR surfaceFormat ()
 
VkFormat depthFormat ()
 
VkSampleCountFlagBits framebufferSamples () const
 
void setInstance (ref_ptr< Instance > instance)
 
ref_ptr< InstancegetInstance ()
 
ref_ptr< InstancegetOrCreateInstance ()
 
void setSurface (ref_ptr< Surface > surface)
 
ref_ptr< SurfacegetSurface ()
 
ref_ptr< SurfacegetOrCreateSurface ()
 
void setPhysicalDevice (ref_ptr< PhysicalDevice > physicalDevice)
 
ref_ptr< PhysicalDevicegetPhysicalDevice ()
 
ref_ptr< PhysicalDevicegetOrCreatePhysicalDevice ()
 
void setDevice (ref_ptr< Device > device)
 
ref_ptr< DevicegetDevice ()
 
ref_ptr< DevicegetOrCreateDevice ()
 
void setRenderPass (ref_ptr< RenderPass > renderPass)
 
ref_ptr< RenderPassgetRenderPass ()
 
ref_ptr< RenderPassgetOrCreateRenderPass ()
 
ref_ptr< SwapchaingetSwapchain ()
 
ref_ptr< SwapchaingetOrCreateSwapchain ()
 
ref_ptr< ImagegetDepthImage ()
 
ref_ptr< ImagegetOrCreateDepthImage ()
 
ref_ptr< ImageViewgetDepthImageView ()
 
ref_ptr< ImageViewgetOrCreateDepthImageView ()
 
size_t numFrames () const
 
ref_ptr< ImageViewimageView (size_t i)
 
const ref_ptr< ImageViewimageView (size_t i) const
 
ref_ptr< Framebufferframebuffer (size_t i)
 
const ref_ptr< Framebufferframebuffer (size_t i) const
 
VkResult acquireNextImage (uint64_t timeout=std::numeric_limits< uint64_t >::max())
 call vkAquireNextImageKHR to find the next imageIndex of the swapchain images/framebuffers
 
size_t imageIndex (size_t relativeFrameIndex=0) const
 get the image index for specified relative frame index, a 0 value is the current frame being rendered, 1 is the previous frame, 2 is the previous frame that.
 
bool debugLayersEnabled () const
 
Frameframe (size_t i)
 
Frames & frames ()
 
- Public Member Functions inherited from vsg::Inherit< Object, Window >
 Inherit (Args &&... args)
 
std::size_t sizeofObject () const noexcept override
 
const char * className () const noexcept override
 
const std::type_info & type_info () const noexcept override
 
bool is_compatible (const std::type_info &type) const noexcept override
 
int compare (const Object &rhs) const override
 
void accept (Visitor &visitor) override
 
void accept (ConstVisitor &visitor) const override
 
void accept (RecordTraversal &visitor) const override
 
- Public Member Functions inherited from vsg::Object
 Object (const Object &)
 
Objectoperator= (const Object &)
 
template<class T >
T * cast ()
 
template<class T >
const T * cast () const
 
virtual void traverse (Visitor &)
 
virtual void traverse (ConstVisitor &) const
 
virtual void traverse (RecordTraversal &) const
 
virtual void read (Input &input)
 
virtual void write (Output &output) const
 
void ref () const noexcept
 
void unref () const noexcept
 
void unref_nodelete () const noexcept
 
unsigned int referenceCount () const noexcept
 
template<typename T >
void setValue (const std::string &key, const T &value)
 
void setValue (const std::string &key, const char *value)
 specialization of setValue to handle passing c strings
 
template<typename T >
bool getValue (const std::string &key, T &value) const
 get specified value type, return false if value associated with key is not assigned or is not the correct type
 
void setObject (const std::string &key, ref_ptr< Object > object)
 assign an Object associated with key
 
ObjectgetObject (const std::string &key)
 get Object pointer associated with key, return nullptr if no object associated with key has been assigned
 
const ObjectgetObject (const std::string &key) const
 get const Object pointer associated with key, return nullptr if no object associated with key has been assigned
 
template<class T >
T * getObject (const std::string &key)
 get object pointer of specified type associated with key, return nullptr if no object associated with key has been assigned
 
template<class T >
const T * getObject (const std::string &key) const
 get const object pointer of specified type associated with key, return nullptr if no object associated with key has been assigned
 
ref_ptr< ObjectgetRefObject (const std::string &key)
 get ref_ptr<Object> associated with key, return nullptr if no object associated with key has been assigned
 
ref_ptr< const ObjectgetRefObject (const std::string &key) const
 get ref_ptr<const Object> pointer associated with key, return nullptr if no object associated with key has been assigned
 
template<class T >
ref_ptr< T > getRefObject (const std::string &key)
 get ref_ptr<T> of specified type associated with key, return nullptr if no object associated with key has been assigned
 
template<class T >
const ref_ptr< const T > getRefObject (const std::string &key) const
 get ref_ptr<const T> of specified type associated with key, return nullptr if no object associated with key has been assigned
 
void removeObject (const std::string &key)
 remove meta object or value associated with key
 
AuxiliarygetOrCreateAuxiliary ()
 
AuxiliarygetAuxiliary ()
 
const AuxiliarygetAuxiliary () const
 

Public Attributes

bool windowVisible = false
 
bool windowValid = false
 
- Public Attributes inherited from vsg::Window
UIEvents bufferedEvents
 events buffered since the last pollEvents.
 

Protected Member Functions

void _initSurface () override
 
- Protected Member Functions inherited from vsg::Window
 Window (ref_ptr< WindowTraits > traits)
 
void _initFormats ()
 
void _initInstance ()
 
void _initPhysicalDevice ()
 
void _initDevice ()
 
void _initRenderPass ()
 
void _initSwapchain ()
 
virtual void clear ()
 
void share (Window &window)
 
void buildSwapchain ()
 
- Protected Member Functions inherited from vsg::Object
virtual void _attemptDelete () const
 
void setAuxiliary (Auxiliary *auxiliary)
 

Additional Inherited Members

- Public Types inherited from vsg::Window
using Frames = std::vector< Frame >
 
- Static Public Member Functions inherited from vsg::Inherit< Window, WindowAdapter >
static ref_ptr< WindowAdaptercreate (Args &&... args)
 
static ref_ptr< WindowAdaptercreate_if (bool flag, Args &&... args)
 
- Static Public Member Functions inherited from vsg::Window
static ref_ptr< Windowcreate (vsg::ref_ptr< WindowTraits > traits)
 static Window::create(traits) method creates a platform specific Window instance based on specified window traits.
 
- Static Public Member Functions inherited from vsg::Inherit< Object, Window >
static ref_ptr< Windowcreate (Args &&... args)
 
static ref_ptr< Windowcreate_if (bool flag, Args &&... args)
 
- Static Public Member Functions inherited from vsg::Object
static ref_ptr< Objectcreate ()
 
static ref_ptr< Objectcreate_if (bool flag)
 
static void * operator new (std::size_t count)
 provide new and delete to enable custom memory management via the vsg::Allocator singleton, using the MEMORY_AFFINTY_OBJECTS
 
static void operator delete (void *ptr)
 
- Protected Attributes inherited from vsg::Window
ref_ptr< WindowTraits_traits
 
VkExtent2D _extent2D
 
VkClearColorValue _clearColor
 
VkSurfaceFormatKHR _imageFormat
 
VkFormat _depthFormat
 
VkSampleCountFlagBits _framebufferSamples
 
ref_ptr< Instance_instance
 
ref_ptr< PhysicalDevice_physicalDevice
 
ref_ptr< Device_device
 
ref_ptr< Surface_surface
 
ref_ptr< Swapchain_swapchain
 
ref_ptr< RenderPass_renderPass
 
ref_ptr< Image_depthImage
 
ref_ptr< ImageView_depthImageView
 
ref_ptr< Image_multisampleImage
 
ref_ptr< ImageView_multisampleImageView
 
ref_ptr< Image_multisampleDepthImage
 
ref_ptr< ImageView_multisampleDepthImageView
 
ref_ptr< Semaphore_availableSemaphore
 
Frames _frames
 
std::vector< size_t > _indices
 

Detailed Description

Class from adapting 3rd party Windowing implementations to a form usable as a vsg::Window Note, the VulkanSceneGraph provides it's own cross platform Windowing support, WindowAdapter is only required when 3rd party windowing is used. The vsgQt project provides an example of WindowAdapter used to adapt Qt window with Vulkan support for use with VSG applications.


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