![]() |
FastEngine 0.9.3
A multiplayer oriented 2D engine made with Vulkan.
|
Vulkan OS window surface made with SDL. More...
#include <C_surface.hpp>
Public Types | |
enum class | Types { UNKNOWN , SDL } |
Public Member Functions | |
SurfaceSDLWindow (Instance &instance) | |
SurfaceSDLWindow (Instance &instance, std::string_view title, fge::Vector2i const &position, fge::Vector2i const &size, uint32_t flags) | |
SurfaceSDLWindow (Instance &instance, fge::Vector2i const &position, fge::Vector2i const &size, uint32_t flags) | |
SurfaceSDLWindow (SurfaceSDLWindow &&r) noexcept | |
bool | create (SDL_Window *window) |
Create a surface by taking an already created SDL_Window. | |
bool | create (std::string_view title, fge::Vector2i const &position, fge::Vector2i const &size, uint32_t flags) |
Create a surface and the SDL_Window. | |
void | destroy () override |
Types | getType () const override |
fge::Vector2i | getSize () const override |
fge::Vector2i | getPosition () const override |
SDL_Window * | getWindow () const |
VkExtent2D | getExtent () const override |
VkSurfaceKHR | get () const |
bool | isCreated () const |
Instance & | getInstance () |
Instance const & | getInstance () const |
Protected Attributes | |
VkSurfaceKHR | _g_surface |
Vulkan OS window surface made with SDL.
This class is used to create a Vulkan surface on a SDL window.
bool fge::vulkan::SurfaceSDLWindow::create | ( | SDL_Window * | window | ) |
Create a surface by taking an already created SDL_Window.
The window must be created with no error and with the SDL_WINDOW_VULKAN flag. This method take the ownership of the SDL window, that means it will automatically destroy it.
window | The SDL window handle |
bool fge::vulkan::SurfaceSDLWindow::create | ( | std::string_view | title, |
fge::Vector2i const & | position, | ||
fge::Vector2i const & | size, | ||
uint32_t | flags ) |
Create a surface and the SDL_Window.
You can use FGE_WINDOWPOS_UNDEFINED or FGE_WINDOWPOS_CENTERED helpers for the position.
title | A valid UTF8 string view |
position | The position of the window when created |
size | The size of the window |
flags | The flag passed to SDL_CreateWindow |
|
overridevirtual |
Implements fge::vulkan::Surface.
|
inlinenodiscardoverridevirtualinherited |
Reimplemented from fge::vulkan::Surface.
|
nodiscardoverridevirtual |
Implements fge::vulkan::SurfaceWindow.
|
nodiscardoverridevirtual |
Implements fge::vulkan::SurfaceWindow.
|
nodiscardoverridevirtual |
Implements fge::vulkan::SurfaceWindow.