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 void fbo_remove(const hpp::string_view& id);
21
22 auto tex_get_or_emplace(const hpp::string_view& id) -> texture::ptr&;
23 auto tex_get(const hpp::string_view& id) const -> const texture::ptr&;
24 auto tex_safe_get(const hpp::string_view& id) const -> const texture::ptr&;
25 void tex_remove(const hpp::string_view& id);
26
27 auto data_get_or_emplace(const hpp::string_view& id, uint32_t default_val = 0) -> uint32_t&;
28 auto data_get(const hpp::string_view& id, uint32_t default_val = 0) const -> uint32_t;
29
30private:
31 std::map<std::string, texture::ptr, std::less<>> textures_;
32 std::map<std::string, frame_buffer::ptr, std::less<>> fbos_;
33 std::map<std::string, uint32_t, std::less<>> data_;
34};
35
36} // namespace gfx
auto fbo_safe_get(const hpp::string_view &id) const -> const frame_buffer::ptr &
void tex_remove(const hpp::string_view &id)
auto data_get(const hpp::string_view &id, uint32_t default_val=0) const -> uint32_t
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 &
void fbo_remove(const hpp::string_view &id)
auto tex_get_or_emplace(const hpp::string_view &id) -> texture::ptr &
auto data_get_or_emplace(const hpp::string_view &id, uint32_t default_val=0) -> uint32_t &