9 #include "third_party/imgui/imgui.h"
19 std::shared_ptr<TypographerContext> typographer_context) {
20 typographer_context_ = std::move(typographer_context);
25 return typographer_context_;
29 return std::make_shared<ContentContext>(
GetContext(), typographer_context_);
38 if (!content_context->IsValid()) {
42 content_context->GetRenderTargetCache()->Start();
43 bool result = entity.
Render(*content_context, pass);
44 content_context->GetRenderTargetCache()->End();
45 content_context->GetTransientsBuffer().Reset();
57 if (!content_context.
IsValid()) {
62 bool result = callback(content_context, pass);
HostBuffer & GetTransientsBuffer() const
Retrieve the currnent host buffer for transient storage.
const std::shared_ptr< RenderTargetAllocator > & GetRenderTargetCache() const
bool Render(const ContentContext &renderer, RenderPass &parent_pass) const
bool OpenPlaygroundHere(Entity entity)
std::shared_ptr< ContentContext > GetContentContext() const
std::shared_ptr< TypographerContext > GetTypographerContext() const
std::function< bool(ContentContext &context, RenderPass &pass)> EntityPlaygroundCallback
void SetTypographerContext(std::shared_ptr< TypographerContext > typographer_context)
void Reset()
Resets the contents of the HostBuffer to nothing so it can be reused.
bool OpenPlaygroundHere(const RenderCallback &render_callback)
std::function< bool(RenderPass &pass)> SinglePassCallback
const PlaygroundSwitches switches_
std::shared_ptr< Context > GetContext() const
Render passes encode render commands directed as one specific render target into an underlying comman...