2024-03-18 15:41:46 -03:00
|
|
|
#ifndef XNA_GRAPHICS_SWAPCHAIN_HPP
|
|
|
|
#define XNA_GRAPHICS_SWAPCHAIN_HPP
|
|
|
|
|
2024-04-22 11:22:18 -03:00
|
|
|
#include "../default.hpp"
|
2024-05-22 20:05:52 -03:00
|
|
|
#include "gresource.hpp"
|
2024-03-18 15:41:46 -03:00
|
|
|
|
|
|
|
namespace xna {
|
2024-05-22 20:05:52 -03:00
|
|
|
class SwapChain : GraphicsResource {
|
2024-03-18 15:41:46 -03:00
|
|
|
public:
|
2024-05-22 20:05:52 -03:00
|
|
|
SwapChain();
|
|
|
|
SwapChain(sptr<GraphicsDevice> const& device);
|
2024-05-23 09:46:11 -03:00
|
|
|
~SwapChain() override;
|
2024-06-22 11:02:01 -03:00
|
|
|
bool Initialize();
|
2024-08-02 11:57:08 -03:00
|
|
|
bool Present(bool vsync) const;
|
2024-05-22 20:05:52 -03:00
|
|
|
bool GetBackBuffer(Texture2D& texture2D);
|
|
|
|
public:
|
|
|
|
struct PlatformImplementation;
|
|
|
|
uptr<PlatformImplementation> impl = nullptr;
|
|
|
|
};
|
2024-03-18 15:41:46 -03:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|