END_TEST;
}
-int UtcDaliRenderTaskRenderPass(void)
+int UtcDaliRenderTaskRenderPassTag(void)
{
TestApplication application;
- tet_infoline("Testing RenderTask with RenderPass");
+ tet_infoline("Testing RenderTask with RenderPassTag");
Stage stage = Stage::GetCurrent();
Vector2 stageSize(stage.GetSize());
Property::Map map[2];
map[0]["vertex"] = SHADER_COLOR_TEST_SHADER_VERT1.data();
map[0]["fragment"] = SHADER_COLOR_TEST_SHADER_FRAG.data();
- map[0]["renderPass"] = 0;
+ map[0]["renderPassTag"] = 0;
map[1]["vertex"] = SHADER_COLOR_TEST_SHADER_VERT2.data();
map[1]["fragment"] = SHADER_COLOR_TEST_SHADER_FRAG.data();
- map[1]["renderPass"] = 1;
+ map[1]["renderPassTag"] = 1;
Property::Array array;
array.PushBack(map[0]);
auto& gfx = application.GetGraphicsController();
RenderTaskList renderTaskList = stage.GetRenderTaskList();
- DALI_TEST_EQUALS(0u, renderTaskList.GetTask(0u).GetRenderPass(), TEST_LOCATION);
+ DALI_TEST_EQUALS(0u, renderTaskList.GetTask(0u).GetRenderPassTag(), TEST_LOCATION);
// Render and notify
application.SendNotification();
application.Render(16);
DALI_TEST_CHECK(gfx.mCallStack.FindMethod("CreatePipeline"));
gfx.mCallStack.Reset();
- DALI_TEST_EQUALS(0u, renderTaskList.GetTask(0u).GetRenderPass(), TEST_LOCATION);
+ DALI_TEST_EQUALS(0u, renderTaskList.GetTask(0u).GetRenderPassTag(), TEST_LOCATION);
- renderTaskList.GetTask(0u).SetRenderPass(1u);
- DALI_TEST_EQUALS(1u, renderTaskList.GetTask(0u).GetRenderPass(), TEST_LOCATION);
+ renderTaskList.GetTask(0u).SetRenderPassTag(1u);
+ DALI_TEST_EQUALS(1u, renderTaskList.GetTask(0u).GetRenderPassTag(), TEST_LOCATION);
// Render and notify
application.SendNotification();
application.Render(16);
DALI_TEST_CHECK(gfx.mCallStack.FindMethod("CreatePipeline"));
gfx.mCallStack.Reset();
- DALI_TEST_EQUALS(1u, renderTaskList.GetTask(0u).GetRenderPass(), TEST_LOCATION);
+ DALI_TEST_EQUALS(1u, renderTaskList.GetTask(0u).GetRenderPassTag(), TEST_LOCATION);
- renderTaskList.GetTask(0u).SetRenderPass(0u);
- DALI_TEST_EQUALS(0u, renderTaskList.GetTask(0u).GetRenderPass(), TEST_LOCATION);
+ renderTaskList.GetTask(0u).SetRenderPassTag(0u);
+ DALI_TEST_EQUALS(0u, renderTaskList.GetTask(0u).GetRenderPassTag(), TEST_LOCATION);
// Render and notify
application.SendNotification();
application.Render(16);
DALI_TEST_CHECK(!gfx.mCallStack.FindMethod("CreatePipeline"));
gfx.mCallStack.Reset();
- DALI_TEST_EQUALS(0u, renderTaskList.GetTask(0u).GetRenderPass(), TEST_LOCATION);
+ DALI_TEST_EQUALS(0u, renderTaskList.GetTask(0u).GetRenderPassTag(), TEST_LOCATION);
- renderTaskList.GetTask(0u).SetRenderPass(1u);
- DALI_TEST_EQUALS(1u, renderTaskList.GetTask(0u).GetRenderPass(), TEST_LOCATION);
+ renderTaskList.GetTask(0u).SetRenderPassTag(1u);
+ DALI_TEST_EQUALS(1u, renderTaskList.GetTask(0u).GetRenderPassTag(), TEST_LOCATION);
// Render and notify
application.SendNotification();
application.Render(16);
DALI_TEST_CHECK(!gfx.mCallStack.FindMethod("CreatePipeline"));
gfx.mCallStack.Reset();
- DALI_TEST_EQUALS(1u, renderTaskList.GetTask(0u).GetRenderPass(), TEST_LOCATION);
+ DALI_TEST_EQUALS(1u, renderTaskList.GetTask(0u).GetRenderPassTag(), TEST_LOCATION);
END_TEST;
}
auto& gfx = application.GetGraphicsController();
RenderTaskList renderTaskList = stage.GetRenderTaskList();
- DALI_TEST_EQUALS(0u, renderTaskList.GetTask(0u).GetRenderPass(), TEST_LOCATION);
+ DALI_TEST_EQUALS(0u, renderTaskList.GetTask(0u).GetRenderPassTag(), TEST_LOCATION);
// Render and notify
application.SendNotification();
application.Render(16);
DALI_TEST_CHECK(!gfx.mCallStack.FindMethod("CreatePipeline"));
gfx.mCallStack.Reset();
- DALI_TEST_EQUALS(0u, renderTaskList.GetTask(0u).GetRenderPass(), TEST_LOCATION);
+ DALI_TEST_EQUALS(0u, renderTaskList.GetTask(0u).GetRenderPassTag(), TEST_LOCATION);
END_TEST;
}
\ No newline at end of file
Property::Map map;
map["vertex"] = VertexSource;
map["fragment"] = FragmentSource;
- map["renderPass"] = 0;
+ map["renderPassTag"] = 0;
map["hints"] = hintSet;
Shader shader = Shader::New(map);
std::string v = (*outMap)["vertex"].Get<std::string>();
std::string f = (*outMap)["fragment"].Get<std::string>();
std::string h = (*outMap)["hints"].Get<std::string>();
- int32_t r = (*outMap)["renderPass"].Get<int32_t>();
+ int32_t r = (*outMap)["renderPassTag"].Get<int32_t>();
DALI_TEST_CHECK(v == map["vertex"].Get<std::string>());
DALI_TEST_CHECK(f == map["fragment"].Get<std::string>());
DALI_TEST_CHECK(h == map["hints"].Get<std::string>());
- DALI_TEST_CHECK(r == map["renderPass"].Get<int32_t>());
+ DALI_TEST_CHECK(r == map["renderPassTag"].Get<int32_t>());
END_TEST;
}
Property::Map map[2];
map[0]["vertex"] = VertexSource;
map[0]["fragment"] = FragmentSource;
- map[0]["renderPass"] = 0;
+ map[0]["renderPassTag"] = 0;
map[0]["hints"] = hintSet;
map[1]["vertex"] = VertexSource2;
map[1]["fragment"] = FragmentSource2;
- map[1]["renderPass"] = 1;
+ map[1]["renderPassTag"] = 1;
map[1]["hints"] = hintSet;
Property::Array array;
std::string v = (*outMap)["vertex"].Get<std::string>();
std::string f = (*outMap)["fragment"].Get<std::string>();
std::string h = (*outMap)["hints"].Get<std::string>();
- int32_t r = (*outMap)["renderPass"].Get<int32_t>();
+ int32_t r = (*outMap)["renderPassTag"].Get<int32_t>();
DALI_TEST_CHECK(v == map[i]["vertex"].Get<std::string>());
DALI_TEST_CHECK(f == map[i]["fragment"].Get<std::string>());
DALI_TEST_CHECK(h == map[i]["hints"].Get<std::string>());
- DALI_TEST_CHECK(r == map[i]["renderPass"].Get<int32_t>());
+ DALI_TEST_CHECK(r == map[i]["renderPassTag"].Get<int32_t>());
}
END_TEST;
Property::Map map[2];
map[0]["vertex"] = VertexSource;
map[0]["fragment"] = FragmentSource;
- map[0]["renderPass"] = 0;
+ map[0]["renderPassTag"] = 0;
map[0]["hints"] = hintSet;
map[1]["vertex"] = VertexSource2;
map[1]["fragment"] = FragmentSource2;
- map[1]["renderPass"] = 1;
+ map[1]["renderPassTag"] = 1;
map[1]["hints"] = hintSet;
Property::Array array;
std::string v = (*outMap)["vertex"].Get<std::string>();
std::string f = (*outMap)["fragment"].Get<std::string>();
std::string h = (*outMap)["hints"].Get<std::string>();
- int32_t r = (*outMap)["renderPass"].Get<int32_t>();
+ int32_t r = (*outMap)["renderPassTag"].Get<int32_t>();
DALI_TEST_CHECK(v == map[i]["vertex"].Get<std::string>());
DALI_TEST_CHECK(f == map[i]["fragment"].Get<std::string>());
DALI_TEST_CHECK(h == map[i]["hints"].Get<std::string>());
- DALI_TEST_CHECK(r == map[i]["renderPass"].Get<int32_t>());
+ DALI_TEST_CHECK(r == map[i]["renderPassTag"].Get<int32_t>());
}
END_TEST;
* @param[in] vertexSource Source code for vertex program
* @param[in] fragmentSource Source code for fragment program
* @param[in] hints Hints for rendering
+ * @param[in] renderPassTag RenderPassTag to match shader data and render task.
*/
- ShaderData(std::string vertexSource, std::string fragmentSource, const Dali::Shader::Hint::Value hints, uint32_t renderPass)
+ ShaderData(std::string vertexSource, std::string fragmentSource, const Dali::Shader::Hint::Value hints, uint32_t renderPassTag)
: mShaderHash(-1),
mVertexShader(StringToVector(vertexSource)),
mFragmentShader(StringToVector(fragmentSource)),
mHints(hints),
mSourceMode(Graphics::ShaderSourceMode::TEXT),
- mRenderPass(renderPass)
+ mRenderPassTag(renderPassTag)
{
}
* @param[in] vertexSource Source code for vertex program
* @param[in] fragmentSource Source code for fragment program
* @param[in] hints Hints for rendering
+ * @param[in] renderPassTag RenderPassTag to match shader data and render task.
*/
- ShaderData(std::vector<char>& vertexSource, std::vector<char>& fragmentSource, const Dali::Shader::Hint::Value hints, uint32_t renderPass)
+ ShaderData(std::vector<char>& vertexSource, std::vector<char>& fragmentSource, const Dali::Shader::Hint::Value hints, uint32_t renderPassTag)
: mShaderHash(-1),
mVertexShader(vertexSource),
mFragmentShader(fragmentSource),
mHints(hints),
mSourceMode(Graphics::ShaderSourceMode::BINARY),
- mRenderPass(renderPass)
+ mRenderPassTag(renderPassTag)
{
}
/**
* Get Render Pass of shader data
- * @return Render Pass of this shader data, Default value is 0.
+ * @return RenderPassTag for Render Pass of this shader data, Default value is 0.
*/
- uint32_t GetRenderPass() const
+ uint32_t GetRenderPassTag() const
{
- return mRenderPass;
+ return mRenderPassTag;
}
-private: // Not implemented
- ShaderData(const ShaderData& other); ///< no copying of this object
- ShaderData& operator=(const ShaderData& rhs); ///< no copying of this object
+private: // Not implemented
+ ShaderData(const ShaderData& other); ///< no copying of this object
+ ShaderData& operator=(const ShaderData& rhs); ///< no copying of this object
-private: // Data
- std::size_t mShaderHash; ///< hash key created with vertex and fragment shader code
- std::vector<char> mVertexShader; ///< source code for vertex program
- std::vector<char> mFragmentShader; ///< source code for fragment program
- Dali::Shader::Hint::Value mHints; ///< take a hint
- Dali::Vector<uint8_t> mBuffer; ///< buffer containing compiled binary bytecode
- Graphics::ShaderSourceMode mSourceMode; ///< Source mode of shader data ( text or binary )
- uint32_t mRenderPass{0u}; ///< Render Pass for this shader
+private: // Data
+ std::size_t mShaderHash; ///< hash key created with vertex and fragment shader code
+ std::vector<char> mVertexShader; ///< source code for vertex program
+ std::vector<char> mFragmentShader; ///< source code for fragment program
+ Dali::Shader::Hint::Value mHints; ///< take a hint
+ Dali::Vector<uint8_t> mBuffer; ///< buffer containing compiled binary bytecode
+ Graphics::ShaderSourceMode mSourceMode; ///< Source mode of shader data ( text or binary )
+ uint32_t mRenderPassTag{0u}; ///< Render Pass Tag for this shader
};
} // namespace Internal
return actor->ScreenToLocal(*this, localX, localY, viewportX, viewportY);
}
-void RenderTask::SetRenderPass(uint32_t renderPass)
+void RenderTask::SetRenderPassTag(uint32_t renderPassTag)
{
- if(mRenderPass != renderPass)
+ if(mRenderPassTag != renderPassTag)
{
- mRenderPass = renderPass;
- SetRenderPassMessage(GetEventThreadServices(), *GetRenderTaskSceneObject(), renderPass);
+ mRenderPassTag = renderPassTag;
+ SetRenderPassTagMessage(GetEventThreadServices(), *GetRenderTaskSceneObject(), renderPassTag);
}
}
-uint32_t RenderTask::GetRenderPass() const
+uint32_t RenderTask::GetRenderPassTag() const
{
- return mRenderPass;
+ return mRenderPassTag;
}
const SceneGraph::RenderTask* RenderTask::GetRenderTaskSceneObject() const
bool ViewportToLocal(Actor* actor, float viewportX, float viewportY, float& localX, float& localY) const;
/**
- * @copydoc Dali::RenderTask::SetRenderPass()
+ * @copydoc Dali::RenderTask::SetRenderPassTag()
*/
- void SetRenderPass(uint32_t renderPass);
+ void SetRenderPassTag(uint32_t renderPassTag);
/**
- * @copydoc Dali::RenderTask::GetRenderPass()
+ * @copydoc Dali::RenderTask::GetRenderPassTag()
*/
- uint32_t GetRenderPass() const;
+ uint32_t GetRenderPassTag() const;
public: // Used by RenderTaskList, which owns the SceneGraph::RenderTasks
/**
Dali::RenderTask::ScreenToFrameBufferFunction mScreenToFrameBufferFunction; ///< Used to convert screen to frame-buffer coordinates
- uint32_t mRenderPass{0u};
+ uint32_t mRenderPassTag{0u};
bool mExclusive : 1; ///< True if the render-task has exclusive access to the source Nodes.
bool mInputEnabled : 1; ///< True if the render-task should be considered for input handling.
const uint32_t ShaderHintsTableSize = static_cast<uint32_t>(sizeof(ShaderHintsTable) / sizeof(ShaderHintsTable[0]));
-static constexpr uint32_t DEFAULT_RENDER_PASS = 0u;
+static constexpr uint32_t DEFAULT_RENDER_PASS_TAG = 0u;
BaseHandle Create()
{
return Property::Value(s);
}
-void GetShaderData(const Property::Map& shaderMap, std::string& vertexShader, std::string& fragmentShader, uint32_t& renderPass, Dali::Shader::Hint::Value& hints)
+void GetShaderData(const Property::Map& shaderMap, std::string& vertexShader, std::string& fragmentShader, uint32_t& renderPassTag, Dali::Shader::Hint::Value& hints)
{
hints = Dali::Shader::Hint::NONE;
- renderPass = 0u;
+ renderPassTag = 0u;
if(Property::Value* value = shaderMap.Find("vertex"))
{
fragmentShader = value->Get<std::string>();
}
- if(Property::Value* value = shaderMap.Find("renderPass"))
+ if(Property::Value* value = shaderMap.Find("renderPassTag"))
{
- renderPass = static_cast<uint32_t>(value->Get<int32_t>());
+ renderPassTag = static_cast<uint32_t>(value->Get<int32_t>());
}
if(Property::Value* value = shaderMap.Find("hints"))
AddShaderMessage(updateManager, transferOwnership);
services.RegisterObject(shader.Get());
- shader->UpdateShaderData(vertexShader, fragmentShader, DEFAULT_RENDER_PASS, hints);
+ shader->UpdateShaderData(vertexShader, fragmentShader, DEFAULT_RENDER_PASS_TAG, hints);
return shader;
}
Dali::Property::Map map;
map["vertex"] = Property::Value(mShaderDataList.front()->GetVertexShader());
map["fragment"] = Property::Value(mShaderDataList.front()->GetFragmentShader());
- map["renderPass"] = Property::Value(static_cast<int32_t>(mShaderDataList.front()->GetRenderPass()));
+ map["renderPassTag"] = Property::Value(static_cast<int32_t>(mShaderDataList.front()->GetRenderPassTag()));
map["hints"] = HintString(mShaderDataList.front()->GetHints());
value = map;
}
Dali::Property::Map map;
map["vertex"] = Property::Value(shaderData->GetVertexShader());
map["fragment"] = Property::Value(shaderData->GetFragmentShader());
- map["renderPass"] = Property::Value(static_cast<int32_t>(shaderData->GetRenderPass()));
+ map["renderPassTag"] = Property::Value(static_cast<int32_t>(shaderData->GetRenderPassTag()));
map["hints"] = HintString(shaderData->GetHints());
array.PushBack(map);
}
void Shader::UpdateShaderData(std::string_view vertexSource,
std::string_view fragmentSource,
- uint32_t renderPass,
+ uint32_t renderPassTag,
Dali::Shader::Hint::Value hints)
{
// Try to load a pre-compiled shader binary for the source pair:
ThreadLocalStorage& tls = ThreadLocalStorage::Get();
ShaderFactory& shaderFactory = tls.GetShaderFactory();
size_t shaderHash;
- Internal::ShaderDataPtr shaderData = shaderFactory.Load(vertexSource, fragmentSource, hints, renderPass, shaderHash);
+ Internal::ShaderDataPtr shaderData = shaderFactory.Load(vertexSource, fragmentSource, hints, renderPassTag, shaderHash);
std::vector<Internal::ShaderDataPtr>::iterator shaderDataIterator = std::find_if(mShaderDataList.begin(), mShaderDataList.end(), [&shaderData](const Internal::ShaderDataPtr& shaderDataItem)
- { return shaderDataItem->GetRenderPass() == shaderData->GetRenderPass(); });
+ { return shaderDataItem->GetRenderPassTag() == shaderData->GetRenderPassTag(); });
if(shaderDataIterator != mShaderDataList.end())
{
*shaderDataIterator = shaderData;
{
std::string vertex;
std::string fragment;
- uint32_t renderPass{0u};
+ uint32_t renderPassTag{0u};
Dali::Shader::Hint::Value hints(Dali::Shader::Hint::NONE);
- GetShaderData(*map, vertex, fragment, renderPass, hints);
+ GetShaderData(*map, vertex, fragment, renderPassTag, hints);
- UpdateShaderData(vertex, fragment, renderPass, hints);
+ UpdateShaderData(vertex, fragment, renderPassTag, hints);
}
}
else if(shaderMap.GetType() == Property::ARRAY)
{
std::string vertex;
std::string fragment;
- uint32_t renderPass{0u};
+ uint32_t renderPassTag{0u};
Dali::Shader::Hint::Value hints(Dali::Shader::Hint::NONE);
- GetShaderData(*map, vertex, fragment, renderPass, hints);
+ GetShaderData(*map, vertex, fragment, renderPassTag, hints);
- UpdateShaderData(vertex, fragment, renderPass, hints);
+ UpdateShaderData(vertex, fragment, renderPassTag, hints);
}
}
}
/**
* @brief Update Shader Data
- * If a ShaderData of the same renderPass is already exist, it is replaced,
+ * If a ShaderData of the same renderPassTag is already exist, it is replaced,
* if not, new ShaderData is added.
* @param[in] vertexShader Vertex shader code for the effect.
* @param[in] fragmentShader Fragment Shader code for the effect.
- * @param[in] renderPass render pass of shader data
+ * @param[in] renderPassTag render pass tag of this shader data
* @param[in] hints Hints to define the geometry of the rendered object
*/
- void UpdateShaderData(std::string_view vertexShader, std::string_view fragmentShader, uint32_t renderPass, Dali::Shader::Hint::Value hints);
+ void UpdateShaderData(std::string_view vertexShader, std::string_view fragmentShader, uint32_t renderPassTag, Dali::Shader::Hint::Value hints);
/**
* @brief Sets shader data from shaderMap.
bool mIgnoreRenderToFbo : 1; ///< Whether to ignore the render to FBO option (used to measure the performance above 60 fps)
Render::FrameBuffer* mFrameBuffer;
- uint32_t mRenderPass{0u};
+ uint32_t mRenderPassTag{0u};
private: // Data
Camera* mCamera; ///< camera that is used
}
// Create Program
- ShaderDataPtr shaderData = mRenderDataProvider->GetShader().GetShaderData(instruction.mRenderPass);
+ ShaderDataPtr shaderData = mRenderDataProvider->GetShader().GetShaderData(instruction.mRenderPassTag);
if(!shaderData)
{
DALI_LOG_ERROR("Failed to get shader data.\n");
namespace
{
-static constexpr uint32_t DEFAULT_RENDER_PASS = 0u;
+static constexpr uint32_t DEFAULT_RENDER_PASS_TAG = 0u;
}
Shader::~Shader()
{
DALI_LOG_TRACE_METHOD_FMT(Debug::Filter::gShader, "%d\n", shaderData->GetHashValue());
std::vector<Internal::ShaderDataPtr>::iterator shaderDataIterator = std::find_if(mShaderDataList.begin(), mShaderDataList.end(), [&shaderData](const Internal::ShaderDataPtr& shaderDataItem)
- { return shaderDataItem->GetRenderPass() == shaderData->GetRenderPass(); });
+ { return shaderDataItem->GetRenderPassTag() == shaderData->GetRenderPassTag(); });
if(shaderDataIterator != mShaderDataList.end())
{
*shaderDataIterator = shaderData;
}
}
-ShaderDataPtr Shader::GetShaderData(uint32_t renderPass) const
+ShaderDataPtr Shader::GetShaderData(uint32_t renderPassTag) const
{
if(mShaderDataList.empty())
{
Internal::ShaderDataPtr returnShaderData = nullptr;
for(auto && shaderData : mShaderDataList)
{
- if(shaderData->GetRenderPass() == renderPass)
+ if(shaderData->GetRenderPassTag() == renderPassTag)
{
return shaderData;
}
- if(shaderData->GetRenderPass() == DEFAULT_RENDER_PASS)
+ if(shaderData->GetRenderPassTag() == DEFAULT_RENDER_PASS_TAG)
{
returnShaderData = shaderData;
}
* Get the shader data for this shader.
* @return The shader data.
*/
- [[nodiscard]] ShaderDataPtr GetShaderData(uint32_t renderPass) const;
+ [[nodiscard]] ShaderDataPtr GetShaderData(uint32_t renderPassTag) const;
private: // Data
Dali::Shader::Hint::Value mHints;
{
renderList->SetHasColorRenderItems(true);
AddRenderersToRenderList(updateBufferIndex,
- instruction.mRenderPass,
+ instruction.mRenderPassTag,
*renderList,
renderables,
viewMatrix,
{
renderList->SetHasColorRenderItems(false);
AddRenderersToRenderList(updateBufferIndex,
- instruction.mRenderPass,
+ instruction.mRenderPassTag,
*renderList,
renderables,
viewMatrix,
new(slot) LocalType(&task, &RenderTask::SetSyncRequired, requiresSync);
}
-inline void SetRenderPassMessage(EventThreadServices& eventThreadServices, const RenderTask& task, uint32_t renderPass)
+inline void SetRenderPassTagMessage(EventThreadServices& eventThreadServices, const RenderTask& task, uint32_t renderPass)
{
using LocalType = MessageValue1<RenderTask, uint32_t>;
uint32_t* slot = eventThreadServices.ReserveMessageSlot(sizeof(LocalType));
// Construct message in the message queue memory; note that delete should not be called on the return value
- new(slot) LocalType(&task, &RenderTask::SetRenderPass, renderPass);
+ new(slot) LocalType(&task, &RenderTask::SetRenderPassTag, renderPass);
}
} // namespace Dali::Internal::SceneGraph
mRenderInstruction[updateBufferIndex].mRenderTracker = nullptr;
}
- mRenderInstruction[updateBufferIndex].mRenderPass = mRenderPass;
+ mRenderInstruction[updateBufferIndex].mRenderPassTag = mRenderPassTag;
return mRenderInstruction[updateBufferIndex];
}
mRequiresSync = requiresSync;
}
-void RenderTask::SetRenderPass(uint32_t renderPass)
+void RenderTask::SetRenderPassTag(uint32_t renderPassTag)
{
- mRenderPass = renderPass;
+ mRenderPassTag = renderPassTag;
}
void RenderTask::PropertyOwnerConnected(PropertyOwner& owner)
* Shader code that matches this render pass is used for rendering.
* If no matching shader is found, the code with a render pass of 0 is used.
* In other cases, operation is not guaranteed.
- * @param[in] renderPass RenderPass value for this render task.
+ * @param[in] renderPassTag RenderPassTag value for this render task.
*/
- void SetRenderPass(uint32_t renderPass);
+ void SetRenderPassTag(uint32_t renderPassTag);
private: // from PropertyOwner::Observer
/**
State mState; ///< Render state.
- uint32_t mRenderPass{0u};
+ uint32_t mRenderPassTag{0u};
bool mRequiresSync : 1; ///< Whether sync is needed to track the render
bool mActive : 1; ///< True when the task is active, i.e. has valid source and camera
}
}
-void RenderTask::SetRenderPass(uint32_t renderPass)
+void RenderTask::SetRenderPassTag(uint32_t renderPassTag)
{
- GetImplementation(*this).SetRenderPass(renderPass);
+ GetImplementation(*this).SetRenderPassTag(renderPassTag);
}
-uint32_t RenderTask::GetRenderPass() const
+uint32_t RenderTask::GetRenderPassTag() const
{
- return GetImplementation(*this).GetRenderPass();
+ return GetImplementation(*this).GetRenderPassTag();
}
RenderTask::RenderTask(Internal::RenderTask* internal)
* Shader code that matches this render pass is used for rendering.
* If no matching shader is found, the code with a render pass of 0 is used.
* In other cases, operation is not guaranteed.
- * @param[in] renderPass RenderPass value for this render task.
+ * @param[in] renderPassTag RenderPassTag value for this render task.
+ * @note RenderPassTag of default RenderTask is 0u.
*/
- void SetRenderPass(uint32_t renderPass);
+ void SetRenderPassTag(uint32_t renderPassTag);
/**
* Gets Render Pass key for this RenderTask.
- * @return RenderPass value for this render task.
+ * @return RenderPassTag value for this render task.
*/
- uint32_t GetRenderPass() const;
+ uint32_t GetRenderPassTag() const;
public: // Signals
/**
* @brief Name: "program", Type: MAP or ARRAY.
* @note The default value is empty.
* @note It is Property::Map or Property::Array of the map.
- * @note Format: {"renderPass":"", "vertex":"", "fragment":"", "hints":""}
+ * @note Format: {"renderPassTag":"", "vertex":"", "fragment":"", "hints":""}
* @SINCE_1_1.43
*/
PROGRAM = DEFAULT_OBJECT_PROPERTY_START_INDEX,
*
* @SINCE_2_2.31
* @param[in] shaderMap Property::Map of shader data or Property::Array of Property::Map.
- * Property::Map format is {"renderPass":"", "vertex":"", "fragment":"", "hints":""}
+ * Property::Map format is {"renderPassTag":"", "vertex":"", "fragment":"", "hints":""}
* shaderMap can be Property::Array of Property::Map for multi pass shading.
* @return A handle to a shader effect
*/