Commit 3a53b3e8 authored by Nghia Truong's avatar Nghia Truong

REFAC: Change debug geometry API: change turnDataModifiedFlagON/OFF to setDataModified(bool)

parent d3f7e50b
......@@ -142,9 +142,9 @@ main()
}
++mode;
debugPoints->turnDataModifiedFlagON();
debugLines->turnDataModifiedFlagON();
debugTriangles->turnDataModifiedFlagON();
debugPoints->setDataModified(true);
debugLines->setDataModified(true);
debugTriangles->setDataModified(true);
// Must call to update render data
for (auto& delegate : renderer->getDebugRenderDelegates())
......
......@@ -103,12 +103,11 @@ public:
///
/// \brief Return m_isModified flag, used to communicate with the render engine
/// For performance reason, the only way to change this flag is to manually call to turnDataModifiedFlagON() or turnDataModifiedFlagOFF
/// Thus, we must call turnDataModifiedFlagON() explicity after finished data manipulation
/// For performance reason, the only way to change this flag is to manually call to setDataModified(true)
/// Thus, we must call setDataModified(true) explicity after finished data manipulation
///
bool isModified() const { return m_isModified; }
void turnDataModifiedFlagON() { m_isModified = true; }
void turnDataModifiedFlagOFF() { m_isModified = false; }
void setDataModified(const bool bState) { m_isModified = bState; }
///
/// \brief Set/Get render material
......
......@@ -71,7 +71,7 @@ VTKdbgLinesRenderDelegate::updateDataSource()
{
if (m_RenderGeoData->isModified())
{
m_RenderGeoData->turnDataModifiedFlagOFF();
m_RenderGeoData->setDataModified(false);
m_mappedVertexArray->SetArray(m_RenderGeoData->getVertexBufferPtr(),
m_RenderGeoData->getNumVertices() * 3, 1);
......
......@@ -71,7 +71,7 @@ VTKdbgPointsRenderDelegate::updateDataSource()
{
if (m_RenderGeoData->isModified())
{
m_RenderGeoData->turnDataModifiedFlagOFF();
m_RenderGeoData->setDataModified(false);
m_mappedVertexArray->SetArray(m_RenderGeoData->getVertexBufferPtr(),
m_RenderGeoData->getNumVertices() * 3, 1);
......
......@@ -67,7 +67,7 @@ VTKdbgTrianglesRenderDelegate::updateDataSource()
{
if (m_RenderGeoData->isModified())
{
m_RenderGeoData->turnDataModifiedFlagOFF();
m_RenderGeoData->setDataModified(false);
m_pappedVertexArray->SetArray(m_RenderGeoData->getVertexBufferPtr(),
m_RenderGeoData->getNumVertices() * 3, 1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment