Hubris Engine Dev
A Project to learn and get into Game Engine developement.
 
Loading...
Searching...
No Matches
Swapchain.h
Go to the documentation of this file.
1#pragma once
2#include <cstdint>
4
5namespace Hubris::Graphics {
6
7 enum class PresentMode : unsigned char {
12 };
13
21
22 class Swapchain {
23 public:
24 virtual ~Swapchain() = default;
25
26 // Prepares or acquires the next image to render into
27 virtual SwapchainResult AcquireNextImage(uint32_t& imageIndex) = 0;
28
29 // Returns an abstract image handle or pointer to image/framebuffer
30 virtual void* GetImage(uint32_t imageIndex) const = 0;
31
32 // Presents the rendered image
33 virtual SwapchainResult Present(uint32_t imageIndex) = 0;
34
35 // Resize the swapchain
36 virtual void Resize(uint32_t width, uint32_t height) = 0;
37
38 // Number of images
39 virtual size_t GetImageCount() const = 0;
40 virtual Format GetImageFormat() const noexcept = 0;
41 /*virtual glm::vec2 GetSize()const noexcept = 0;*/
42 virtual bool IsValid() const noexcept = 0;
43
44 virtual void Destroy() noexcept = 0;
45 };
46}
virtual void Resize(uint32_t width, uint32_t height)=0
virtual SwapchainResult AcquireNextImage(uint32_t &imageIndex)=0
virtual bool IsValid() const noexcept=0
virtual SwapchainResult Present(uint32_t imageIndex)=0
virtual ~Swapchain()=default
virtual size_t GetImageCount() const =0
virtual Format GetImageFormat() const noexcept=0
virtual void * GetImage(uint32_t imageIndex) const =0
virtual void Destroy() noexcept=0
Contains all graphics related classes and structs.
Definition Format.h:9