14 bool supports_read_from_resolve,
15 bool supports_implicit_msaa)
16 : target_(render_target),
17 supports_read_from_resolve_(supports_read_from_resolve),
18 supports_implicit_msaa_(supports_implicit_msaa) {}
24 VALIDATION_LOG <<
"EntityPassTarget Flip should never be called for a "
32 if (supports_read_from_resolve_) {
40 if (!secondary_color_texture_) {
48 if (!secondary_color_texture_) {
55 if (supports_implicit_msaa_) {
58 color0.
texture = secondary_color_texture_;
59 secondary_color_texture_ = new_secondary;
68 return secondary_color_texture_;
80 secondary_color_texture_ =
nullptr;
const std::shared_ptr< RenderTargetAllocator > & GetRenderTargetCache() const
std::shared_ptr< Context > GetContext() const
RenderTarget & GetRenderTarget()
void RemoveSecondary()
Remove the cached secondary color texture.
EntityPassTarget(const RenderTarget &render_target, bool supports_read_from_resolve, bool supports_implicit_msaa)
std::shared_ptr< Texture > Flip(const ContentContext &renderer)
Flips the backdrop and returns a readable texture that can be bound/sampled to restore the previous p...
ColorAttachment GetColorAttachment(size_t index) const
Get the color attachment at [index].
std::shared_ptr< Texture > GetRenderTargetTexture() const
RenderTarget & SetColorAttachment(const ColorAttachment &attachment, size_t index)
std::shared_ptr< Texture > resolve_texture
std::shared_ptr< Texture > texture
A lightweight object that describes the attributes of a texture that can then used an allocator to cr...