25 auto& counter = get_counter();
26 if(counter >= limits.maxViews - 1)
28 gfx::log(
"warning",
"Render pass ID overflow", __FILE__, __LINE__);
37auto get_scopes() -> std::vector<std::string>&
39 static std::vector<std::string> scopes;
45 get_scopes().emplace_back(
name);
50 get_scopes().pop_back();
61 const auto& scopes = get_scopes();
68 std::string scoped_name{};
69 for(
const auto&
scope : scopes)
71 scoped_name.append(
scope).append(
"/");
74 scoped_name.append(
name);
109 uint8_t _stencil )
const
117 clear(BGFX_CLEAR_COLOR | BGFX_CLEAR_DEPTH | BGFX_CLEAR_STENCIL, 0x000000FF, 1.0f, 0);
137 auto&
count = get_counter();
138 get_last_frame_counter() =
count;
145 return limits.maxViews - 1;
150 return get_last_frame_counter();
static auto invalid_handle() -> frame_buffer_handle
auto native_handle() const -> T
void set_view_scissor(view_id _id, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height)
void set_view_mode(view_id _id, view_mode _mode)
void set_view_clear(view_id _id, uint16_t _flags, uint32_t _rgba, float _depth, uint8_t _stencil)
void reset_view(view_id _id)
void set_view_frame_buffer(view_id _id, frame_buffer_handle _handle)
void set_view_rect(view_id _id, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height)
void set_view_name(view_id _id, const char *_name)
void log(const std::string &category, const std::string &log_msg, const char *_filePath, uint16_t _line)
void set_view_transform(view_id _id, const void *_view, const void *_proj)
auto get_size() const -> usize32_t
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 auto get_max_pass_id() -> gfx::view_id
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)
render_pass(const char *name)
static void push_scope(const char *name)
void bind(const frame_buffer *fb=nullptr) const