MeshLib C++ Docs
Loading...
Searching...
No Matches
MR::RenderMeshObject Class Reference

#include <MRRenderMeshObject.h>

+ Inheritance diagram for MR::RenderMeshObject:

Public Member Functions

MRVIEWER_API RenderMeshObject (const VisualObject &visObj)
 
virtual MRVIEWER_API ~RenderMeshObject ()
 
virtual MRVIEWER_API bool render (const ModelRenderParams &params) override
 Returns true if something was rendered, or false if nothing to render.
 
virtual MRVIEWER_API void renderPicker (const ModelBaseRenderParams &params, unsigned geomId) override
 
virtual MRVIEWER_API size_t heapBytes () const override
 returns the amount of memory this object occupies on heap
 
virtual MRVIEWER_API size_t glBytes () const override
 returns the amount of memory this object allocated in OpenGL
 
virtual MRVIEWER_API void forceBindAll () override
 binds all data for this render object, not to bind ever again (until object becomes dirty)
 
- Public Member Functions inherited from MR::IRenderObject
virtual ~IRenderObject ()=default
 
virtual void renderUi (const UiRenderParams &params)
 

Protected Types

typedef unsigned int GLuint
 

Protected Member Functions

MRVIEWER_API RenderBufferRef< Vector3f > loadVertPosBuffer_ ()
 
MRVIEWER_API RenderBufferRef< Vector3f > loadVertNormalsBuffer_ ()
 
MRVIEWER_API RenderBufferRef< ColorloadVertColorsBuffer_ ()
 
MRVIEWER_API RenderBufferRef< UVCoord > loadVertUVBuffer_ ()
 
MRVIEWER_API RenderBufferRef< Vector3i > loadFaceIndicesBuffer_ ()
 
MRVIEWER_API RenderBufferRef< unsigned > loadFaceSelectionTextureBuffer_ ()
 
MRVIEWER_API RenderBufferRef< Vector4f > loadFaceNormalsTextureBuffer_ ()
 
MRVIEWER_API RenderBufferRef< uint8_t > loadTexturePerFaceTextureBuffer_ ()
 
MRVIEWER_API RenderBufferRef< VertId > loadPointValidIndicesBuffer_ ()
 
virtual MRVIEWER_API void renderEdges_ (const ModelRenderParams &parameters, RenderModelPassMask desiredPass, GLuint vao, const Color &color, uint32_t dirtyFlag)
 
virtual MRVIEWER_API void renderMeshEdges_ (const ModelRenderParams &parameters, RenderModelPassMask desiredPass)
 
virtual MRVIEWER_API void renderMeshVerts_ (const ModelRenderParams &parameters, RenderModelPassMask desiredPass)
 
virtual MRVIEWER_API void bindMesh_ (GLStaticHolder::ShaderType shaderType)
 
virtual MRVIEWER_API void bindMeshPicker_ ()
 
virtual MRVIEWER_API void bindEdges_ ()
 
virtual MRVIEWER_API void bindBorders_ ()
 
virtual MRVIEWER_API void bindSelectedEdges_ ()
 
virtual MRVIEWER_API void bindEmptyTextures_ (GLuint shaderId)
 
virtual MRVIEWER_API void bindPoints_ (GLStaticHolder::ShaderType shaderType)
 
virtual MRVIEWER_API void drawMesh_ (bool solid, ViewportId viewportId, bool picker=false) const
 
virtual MRVIEWER_API void initBuffers_ ()
 Create a new set of OpenGL buffer objects.
 
virtual MRVIEWER_API void freeBuffers_ ()
 Release the OpenGL buffer objects.
 
virtual MRVIEWER_API void update_ (ViewportMask mask)
 

Protected Attributes

const ObjectMeshHolderobjMesh_
 
int vertPosSize_ { 0 }
 
int vertNormalsSize_ { 0 }
 
int vertColorsSize_ { 0 }
 
int vertUVSize_ { 0 }
 
int faceIndicesSize_ { 0 }
 
int edgeSize_ { 0 }
 
int selEdgeSize_ { 0 }
 
int bordersSize_ { 0 }
 
int pointSize_ { 0 }
 
int pointValidSize_ { 0 }
 
Vector2i faceSelectionTextureSize_
 
Vector2i faceNormalsTextureSize_
 
Vector2i texturePerFaceSize_
 
GLuint edgesArrayObjId_ { 0 }
 
GLuint borderArrayObjId_ { 0 }
 
GlBuffer borderBuffer_
 
GLuint selectedEdgesArrayObjId_ { 0 }
 
GlBuffer selectedEdgesBuffer_
 
GLuint meshArrayObjId_ { 0 }
 
GLuint meshPickerArrayObjId_ { 0 }
 
GlBuffer vertPosBuffer_
 
GlBuffer vertUVBuffer_
 
GlBuffer vertNormalsBuffer_
 
GlBuffer vertColorsBuffer_
 
GlBuffer facesIndicesBuffer_
 
GlTexture2 faceSelectionTex_
 
GlTexture2 faceColorsTex_
 
GlTexture2 facesNormalsTex_
 
GlTexture2 texturePerFace_
 
GlTexture2DArray textureArray_
 
GlTexture2 edgesTexture_
 
GlTexture2 selEdgesTexture_
 
GlTexture2 borderTexture_
 
GlTexture2 emptyVertsColorTexture_
 
GlTexture2 emptyLinesColorTexture_
 
GlTexture2 emptyScnLengthColorTexture_
 
int maxTexSize_ { 0 }
 
GLuint pointsArrayObjId_ { 0 }
 
GlBuffer pointValidBuffer_
 
bool dirtyPointPos_ = false
 
uint32_t dirty_ { 0 }
 Marks dirty buffers that need to be uploaded to OpenGL.
 
bool dirtyEdges_ { false }
 ...
 
bool cornerMode_ = false
 

The documentation for this class was generated from the following file: