Unravel Engine C++ Reference
Loading...
Searching...
No Matches
render_view.h
Go to the documentation of this file.
1#pragma once
2
3#include "frame_buffer.h"
4#include <base/basetypes.hpp>
5#include <base/hash.hpp>
6#include <functional>
7#include <hpp/string_view.hpp>
8#include <map>
9
10namespace gfx
11{
12
13
15{
16public:
17 auto fbo_get_or_emplace(const hpp::string_view& id) -> frame_buffer::ptr&;
18 auto fbo_get(const hpp::string_view& id) const -> const frame_buffer::ptr&;
19 auto fbo_safe_get(const hpp::string_view& id) const -> const frame_buffer::ptr&;
20
21 auto tex_get_or_emplace(const hpp::string_view& id) -> texture::ptr&;
22 auto tex_get(const hpp::string_view& id) const -> const texture::ptr&;
23 auto tex_safe_get(const hpp::string_view& id) const -> const texture::ptr&;
24
25private:
26 std::map<std::string, texture::ptr, std::less<>> textures_;
27 std::map<std::string, frame_buffer::ptr, std::less<>> fbos_;
28};
29
30} // namespace gfx
auto fbo_safe_get(const hpp::string_view &id) const -> const frame_buffer::ptr &
auto fbo_get_or_emplace(const hpp::string_view &id) -> frame_buffer::ptr &
auto fbo_get(const hpp::string_view &id) const -> const frame_buffer::ptr &
auto tex_get(const hpp::string_view &id) const -> const texture::ptr &
auto tex_safe_get(const hpp::string_view &id) const -> const texture::ptr &
auto tex_get_or_emplace(const hpp::string_view &id) -> texture::ptr &