Unravel Engine C++ Reference
Loading...
Searching...
No Matches
render_pass.h
Go to the documentation of this file.
1#pragma once
2#include "frame_buffer.h"
3#include <string>
4#include <unordered_map>
5#include <vector>
6
7namespace gfx
8{
10{
11 static void push_scope(const char* name);
12 static void pop_scope();
13
14 struct scope
15 {
16 scope(const char* name)
17 {
19 }
21 {
22 pop_scope();
23 }
24 };
25
26 //-----------------------------------------------------------------------------
27 // Name : render_pass ()
33 //-----------------------------------------------------------------------------
34 render_pass(const char* name);
35 render_pass(view_id id, const char* name);
36
37
38 //-----------------------------------------------------------------------------
39 // Name : bind ()
45 //-----------------------------------------------------------------------------
46 void bind(const frame_buffer* fb = nullptr) const;
47 void touch() const;
48 //-----------------------------------------------------------------------------
49 // Name : clear ()
55 //-----------------------------------------------------------------------------
56 void clear(uint16_t _flags, uint32_t _rgba = 0x000000ff, float _depth = 1.0f, uint8_t _stencil = 0) const;
57
58 //-----------------------------------------------------------------------------
59 // Name : clear ()
65 //-----------------------------------------------------------------------------
66 void clear() const;
67
68 //-----------------------------------------------------------------------------
69 // Name : set_view_proj ()
75 //-----------------------------------------------------------------------------
76 void set_view_proj(const float* v, const float* p);
77
78 //-----------------------------------------------------------------------------
79 // Name : set_view_scissor ()
85 //-----------------------------------------------------------------------------
86 void set_view_scissor(uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height);
87 void set_view_rect(uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height);
88 //-----------------------------------------------------------------------------
89 // Name : reset ()
95 //-----------------------------------------------------------------------------
96 static void reset();
97
98 //-----------------------------------------------------------------------------
99 // Name : get_pass ()
105 //-----------------------------------------------------------------------------
106 static auto get_max_pass_id() -> gfx::view_id;
107
111};
112} // namespace gfx
std::string name
Definition hub.cpp:33
bgfx::ViewId view_id
Definition graphics.h:20
scope(const char *name)
Definition render_pass.h:16
static auto get_last_frame_max_pass_id() -> gfx::view_id
void set_view_rect(uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height)
static void reset()
static auto get_max_pass_id() -> gfx::view_id
static void pop_scope()
void clear() const
void set_view_proj(const float *v, const float *p)
void set_view_scissor(uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height)
gfx::view_id id
render_pass(const char *name)
void touch() const
static void push_scope(const char *name)
void bind(const frame_buffer *fb=nullptr) const