Unravel Engine C++ Reference
Loading...
Searching...
No Matches
render_window.h
Go to the documentation of this file.
1#pragma once
2#include <engine/engine_export.h>
3
5#include <ospp/display_mode.h>
6#include <ospp/event.h>
7#include <ospp/init.h>
8#include <ospp/window.h>
9
10#include <memory>
11
12namespace unravel
13{
14
19{
20public:
21 using graphics_surface_t = std::shared_ptr<gfx::frame_buffer>;
22
27 render_window(os::window&& win);
28
33
37 void prepare_surface();
38
42 void destroy_surface();
43
49 void resize(uint32_t w, uint32_t h);
50
55 auto get_window() -> os::window&;
56
62
68
74
75private:
77 os::window window_;
79 std::unique_ptr<gfx::render_pass> pass_;
81 mutable graphics_surface_t surface_;
82};
83
84} // namespace unravel
Struct representing a render window.
~render_window()
Destructor for the render window.
std::shared_ptr< gfx::frame_buffer > graphics_surface_t
auto get_surface() -> graphics_surface_t &
Gets the rendering surface.
void prepare_surface()
Prepares the rendering surface.
void destroy_surface()
Destroys the rendering surface.
auto begin_present_pass() -> gfx::render_pass &
Begins the present render pass.
void resize(uint32_t w, uint32_t h)
Resizes the render window to the specified width and height.
auto get_window() -> os::window &
Gets the associated OS window.
render_window(os::window &&win)
Constructs a render window with the specified OS window.
auto get_present_pass() -> gfx::render_pass &
Gets the present render pass.