ReShade
A generic post-processing injector for games and video software.
Public Member Functions | List of all members
reshade::api::swapchain Struct Referenceabstract

A swap chain, used to present images to the screen. More...

#include <reshade_api_device.hpp>

Inheritance diagram for reshade::api::swapchain:
reshade::api::device_object reshade::api::api_object

Public Member Functions

virtual void * get_hwnd () const =0
 Gets the handle of the window this swap chain was created with, or nullptr if this is an offscreen swap chain. More...
 
virtual resource get_back_buffer (uint32_t index)=0
 Gets the back buffer resource at the specified index in this swap chain. More...
 
virtual uint32_t get_back_buffer_count () const =0
 Gets the number of back buffer resources in this swap chain. More...
 
resource get_current_back_buffer ()
 Gets the current back buffer resource. More...
 
virtual uint32_t get_current_back_buffer_index () const =0
 Gets the index of the back buffer resource that can currently be rendered into. More...
 
virtual bool check_color_space_support (color_space color_space) const =0
 Checks whether the specified color space is supported for presentation. More...
 
virtual color_space get_color_space () const =0
 Gets the color space used for presentation. More...
 
- Public Member Functions inherited from reshade::api::device_object
virtual deviceget_device ()=0
 Gets the parent device for this object. More...
 
- Public Member Functions inherited from reshade::api::api_object
virtual uint64_t get_native () const =0
 Gets the underlying native object for this API object. More...
 
virtual void get_private_data (const uint8_t guid[16], uint64_t *data) const =0
 Gets a user-defined 64-bit value from the object that was previously set via set_private_data, or zero if none associated with the specified guid exists. More...
 
virtual void set_private_data (const uint8_t guid[16], const uint64_t data)=0
 Stores a user-defined 64-bit value in the object and associates it with the specified guid . More...
 
template<typename T >
T & get_private_data () const
 Gets a reference to user-defined data from the object that was previously allocated via create_private_data. More...
 
template<typename T , typename... Args>
T & create_private_data (Args &&... args)
 Allocates user-defined data and stores it in the object. More...
 
template<typename T >
void destroy_private_data ()
 Frees user-defined data that was previously allocated via create_private_data. More...
 

Detailed Description

A swap chain, used to present images to the screen.

Functionally equivalent to a 'IDirect3DSwapChain9', 'IDXGISwapChain', 'HDC' or 'VkSwapchainKHR'.

Member Function Documentation

◆ check_color_space_support()

virtual bool reshade::api::swapchain::check_color_space_support ( color_space  color_space) const
pure virtual

Checks whether the specified color space is supported for presentation.

◆ get_back_buffer()

virtual resource reshade::api::swapchain::get_back_buffer ( uint32_t  index)
pure virtual

Gets the back buffer resource at the specified index in this swap chain.

Parameters
indexIndex of the back buffer. This has to be between zero and the value returned by get_back_buffer_count.

◆ get_back_buffer_count()

virtual uint32_t reshade::api::swapchain::get_back_buffer_count ( ) const
pure virtual

Gets the number of back buffer resources in this swap chain.

◆ get_color_space()

virtual color_space reshade::api::swapchain::get_color_space ( ) const
pure virtual

Gets the color space used for presentation.

◆ get_current_back_buffer()

resource reshade::api::swapchain::get_current_back_buffer ( )
inline

Gets the current back buffer resource.

◆ get_current_back_buffer_index()

virtual uint32_t reshade::api::swapchain::get_current_back_buffer_index ( ) const
pure virtual

Gets the index of the back buffer resource that can currently be rendered into.

◆ get_hwnd()

virtual void* reshade::api::swapchain::get_hwnd ( ) const
pure virtual

Gets the handle of the window this swap chain was created with, or nullptr if this is an offscreen swap chain.


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