class Program;
class Shader;
class Texture;
+class RenderTarget;
+class RenderPass;
/**
* @brief Structure describes 2D offset
struct InputAssemblyState
{
PrimitiveTopology topology{};
- bool primitiveRestartEnable{true};
+ bool primitiveRestartEnable{false};
auto& SetTopology(PrimitiveTopology value)
{
auto& SetPrimitiveRestartEnable(bool value)
{
- primitiveRestartEnable = true;
+ primitiveRestartEnable = value;
return *this;
}
};
struct CommandBufferBeginInfo
{
CommandBufferUsageFlags usage;
- // Don't care about inheritance yet. Can extend as required.
+ const RenderPass* renderPass{nullptr};
+ const RenderTarget* renderTarget{nullptr};
+ auto& SetUsage(CommandBufferUsageFlags flags)
+ {
+ usage = flags;
+ return *this;
+ }
+ auto& SetRenderPass(const RenderPass& value)
+ {
+ renderPass = &value;
+ return *this;
+ }
+ auto& SetRenderTarget(const RenderTarget& value)
+ {
+ renderTarget = &value;
+ return *this;
+ }
};
/**
template<class P, template<typename> typename U>
DefaultDeleter(const U<P>& deleter)
{
- deleteFunction = [](T* object)
- { U<P>()(static_cast<P*>(object)); };
+ deleteFunction = [](T* object) { U<P>()(static_cast<P*>(object)); };
}
/**
const Rect<int>& rootClippingRect,
int orientation,
const Uint16Pair& sceneSize,
+ Graphics::RenderPass* renderPass,
Graphics::RenderTarget* renderTarget)
{
DALI_PRINT_RENDER_LIST(renderList);
// We are always "inside" a render pass here.
Graphics::CommandBufferBeginInfo info;
- info.usage = 0 | Graphics::CommandBufferUsageFlagBits::ONE_TIME_SUBMIT;
+ info.SetUsage(0 | Graphics::CommandBufferUsageFlagBits::RENDER_PASS_CONTINUE)
+ .SetRenderPass(*renderPass)
+ .SetRenderTarget(*renderTarget);
secondaryCommandBuffer.Begin(info);
secondaryCommandBuffer.SetViewport(ViewportFromClippingBox(sceneSize, mViewportRectangle, orientation));
const Rect<int>& rootClippingRect,
int orientation,
const Uint16Pair& sceneSize,
+ Graphics::RenderPass* renderPass,
Graphics::RenderTarget* renderTarget)
{
DALI_TRACE_BEGIN_WITH_MESSAGE_GENERATOR(gTraceFilter, "DALI_RENDER_INSTRUCTION_PROCESS", [&](std::ostringstream& oss) { oss << "[" << instruction.RenderListCount() << "]"; });
rootClippingRect,
orientation,
sceneSize,
+ renderPass,
renderTarget);
// Execute command buffer
const Rect<int>& rootClippingRect,
int orientation,
const Uint16Pair& sceneSize,
+ Graphics::RenderPass* renderPass,
Graphics::RenderTarget* renderTarget);
/**
const Rect<int>& rootClippingRect,
int orientation,
const Uint16Pair& sceneSize,
+ Graphics::RenderPass* renderPass,
Graphics::RenderTarget* renderTarget);
// Member variables:
clippingRect,
surfaceOrientation,
Uint16Pair(surfaceRect.width, surfaceRect.height),
+ currentRenderPass,
currentRenderTarget);
Graphics::SyncObject* syncObject{nullptr};
if(targetsToPresent.size() > 0u)
{
- DALI_TRACE_BEGIN_WITH_MESSAGE_GENERATOR(gTraceFilter, "DALI_RENDER_FINISHED", [&](std::ostringstream& oss) { oss << "[" << targetsToPresent.size() << "]"; });
+ DALI_TRACE_BEGIN_WITH_MESSAGE_GENERATOR(gTraceFilter, "DALI_RENDER_FINISHED", [&](std::ostringstream& oss)
+ { oss << "[" << targetsToPresent.size() << "]"; });
}
// Flush UBOs