Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions source/MRMesh/MRIRenderObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,6 @@ class IRenderObject
virtual size_t heapBytes() const = 0;
/// returns the amount of memory this object allocated in OpenGL
virtual size_t glBytes() const = 0;
/// the way the internal buffers are dealt with
enum BufferMode {
/// preserve the buffers to reduce re-allocation count
AllocationEfficient,
/// clear the buffers on every update to reduce memory consumption
MemoryEfficient,
};
/// returns internal buffer mode
BufferMode getBufferMode() const { return bufferMode_; }
/// sets internal buffer mode
void setBufferMode( BufferMode bufferMode ) { bufferMode_ = bufferMode; }

protected:
BufferMode bufferMode_{ AllocationEfficient };
};

MRMESH_API std::unique_ptr<IRenderObject> createRenderObject( const VisualObject& visObj, const std::type_index& type );
Expand Down
14 changes: 0 additions & 14 deletions source/MRMesh/MRVisualObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -380,18 +380,4 @@ void VisualObject::setDefaultColors_()
setLabelsColor( SceneColors::get( SceneColors::Labels ) );
}

IRenderObject::BufferMode VisualObject::getRenderBufferMode() const
{
if ( !renderObj_ )
return IRenderObject::AllocationEfficient;
return renderObj_->getBufferMode();
}

void VisualObject::setRenderBufferMode( IRenderObject::BufferMode bufferMode )
{
if ( !renderObj_ )
return;
renderObj_->setBufferMode( bufferMode );
}

} //namespace MR
3 changes: 0 additions & 3 deletions source/MRMesh/MRVisualObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,6 @@ class MRMESH_CLASS VisualObject : public Object
/// is object has visual representation (faces, edges, etc.)
virtual bool hasVisualRepresentation() const { return false; }

MRMESH_API IRenderObject::BufferMode getRenderBufferMode() const;
MRMESH_API void setRenderBufferMode( IRenderObject::BufferMode bufferMode );

/// returns bounding box of this object in world coordinates;
/// if you need bounding box in local coordinates please call getBoundingBox()
MRMESH_API virtual Box3f getWorldBox( ViewportId = {} ) const override;
Expand Down
1 change: 0 additions & 1 deletion source/MRViewer/MRRenderMeshObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ RenderMeshObject::RenderMeshObject( const VisualObject& visObj )
assert( objMesh_ );
if ( Viewer::constInstance()->isGLInitialized() )
initBuffers_();
bufferMode_ = MemoryEfficient;
}

RenderMeshObject::~RenderMeshObject()
Expand Down