22 texture_desc.
size = {100, 100};
27 GetContext()->GetResourceAllocator()->CreateTexture(texture_desc);
33 auto content_context = GetContentContext();
34 auto buffer = content_context->GetContext()->CreateCommandBuffer();
36 GetContentContext()->GetRenderTargetCache()->CreateOffscreenMSAA(
37 *content_context->GetContext(), {100, 100},
39 auto render_pass =
buffer->CreateRenderPass(render_target);
40 auto recording_pass = std::make_shared<RecordingRenderPass>(
41 render_pass, GetContext(), render_target);
43 ASSERT_TRUE(contents.
Render(*GetContentContext(), {}, *recording_pass));
44 const std::vector<Command>& commands = recording_pass->GetCommands();
46 ASSERT_EQ(commands.size(), 1u);
47 EXPECT_TRUE(commands[0].pipeline->GetDescriptor().GetLabel().find(
48 "TextureFill Pipeline") != std::string::npos);
51 recording_pass->EncodeCommands();
60 "External OES textures are only valid for the OpenGLES backend.");
64 texture_desc.
size = {100, 100};
69 GetContext()->GetResourceAllocator()->CreateTexture(texture_desc);
75 auto content_context = GetContentContext();
76 auto buffer = content_context->GetContext()->CreateCommandBuffer();
78 GetContentContext()->GetRenderTargetCache()->CreateOffscreenMSAA(
79 *content_context->GetContext(), {100, 100},
81 auto render_pass =
buffer->CreateRenderPass(render_target);
83 ASSERT_TRUE(contents.
Render(*GetContentContext(), {}, *render_pass));
84 const std::vector<Command>& commands = render_pass->GetCommands();
86 ASSERT_EQ(commands.size(), 1u);
87 EXPECT_TRUE(commands[0].pipeline->GetDescriptor().GetLabel().find(
88 "TiledTextureFillExternal Pipeline") != std::string::npos);
void SetGeometry(std::shared_ptr< Geometry > geometry)
Set the geometry that this contents will use to render.
bool Render(const ContentContext &renderer, const Entity &entity, RenderPass &pass) const override
void SetTexture(std::shared_ptr< Texture > texture)
static const uint8_t buffer[]
A lightweight object that describes the attributes of a texture that can then used an allocator to cr...