MeshLib Documentation
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
 
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< UVCoordloadVertUVBuffer_ ()
 
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, bool alphaSort, GLuint vao, const Color &color, uint32_t dirtyFlag)
 
virtual MRVIEWER_API void renderMeshEdges_ (const ModelRenderParams &parameters, bool alphaSort)
 
virtual MRVIEWER_API void renderMeshVerts_ (const ModelRenderParams &parameters, bool alphaSort)
 
virtual MRVIEWER_API void bindMesh_ (bool alphaSort)
 
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_ (bool alphaSort)
 
virtual MRVIEWER_API void drawMesh_ (bool solid, ViewportId viewportId, bool picker=false) const
 
virtual MRVIEWER_API void initBuffers_ ()
 
virtual MRVIEWER_API void freeBuffers_ ()
 
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_
 
int maxTexSize_ { 0 }
 
GLuint pointsArrayObjId_ { 0 }
 
GlBuffer pointValidBuffer_
 
bool dirtyPointPos_ = false
 
uint32_t dirty_ { 0 }
 
bool dirtyEdges_ { false }
 
bool cornerMode = false
 

Member Typedef Documentation

◆ GLuint

typedef unsigned int MR::RenderMeshObject::GLuint
protected

Constructor & Destructor Documentation

◆ RenderMeshObject()

MRVIEWER_API MR::RenderMeshObject::RenderMeshObject ( const VisualObject & visObj)

◆ ~RenderMeshObject()

virtual MRVIEWER_API MR::RenderMeshObject::~RenderMeshObject ( )
virtual

Member Function Documentation

◆ bindBorders_()

virtual MRVIEWER_API void MR::RenderMeshObject::bindBorders_ ( )
protectedvirtual

◆ bindEdges_()

virtual MRVIEWER_API void MR::RenderMeshObject::bindEdges_ ( )
protectedvirtual

◆ bindEmptyTextures_()

virtual MRVIEWER_API void MR::RenderMeshObject::bindEmptyTextures_ ( GLuint shaderId)
protectedvirtual

◆ bindMesh_()

virtual MRVIEWER_API void MR::RenderMeshObject::bindMesh_ ( bool alphaSort)
protectedvirtual

◆ bindMeshPicker_()

virtual MRVIEWER_API void MR::RenderMeshObject::bindMeshPicker_ ( )
protectedvirtual

◆ bindPoints_()

virtual MRVIEWER_API void MR::RenderMeshObject::bindPoints_ ( bool alphaSort)
protectedvirtual

◆ bindSelectedEdges_()

virtual MRVIEWER_API void MR::RenderMeshObject::bindSelectedEdges_ ( )
protectedvirtual

◆ drawMesh_()

virtual MRVIEWER_API void MR::RenderMeshObject::drawMesh_ ( bool solid,
ViewportId viewportId,
bool picker = false ) const
protectedvirtual

◆ forceBindAll()

virtual MRVIEWER_API void MR::RenderMeshObject::forceBindAll ( )
overridevirtual

binds all data for this render object, not to bind ever again (until object becomes dirty)

Reimplemented from MR::IRenderObject.

◆ freeBuffers_()

virtual MRVIEWER_API void MR::RenderMeshObject::freeBuffers_ ( )
protectedvirtual

◆ glBytes()

virtual MRVIEWER_API size_t MR::RenderMeshObject::glBytes ( ) const
overridevirtual

returns the amount of memory this object allocated in OpenGL

Implements MR::IRenderObject.

◆ heapBytes()

virtual MRVIEWER_API size_t MR::RenderMeshObject::heapBytes ( ) const
overridevirtual

returns the amount of memory this object occupies on heap

Implements MR::IRenderObject.

◆ initBuffers_()

virtual MRVIEWER_API void MR::RenderMeshObject::initBuffers_ ( )
protectedvirtual

◆ loadFaceIndicesBuffer_()

MRVIEWER_API RenderBufferRef< Vector3i > MR::RenderMeshObject::loadFaceIndicesBuffer_ ( )
protected

◆ loadFaceNormalsTextureBuffer_()

MRVIEWER_API RenderBufferRef< Vector4f > MR::RenderMeshObject::loadFaceNormalsTextureBuffer_ ( )
protected

◆ loadFaceSelectionTextureBuffer_()

MRVIEWER_API RenderBufferRef< unsigned > MR::RenderMeshObject::loadFaceSelectionTextureBuffer_ ( )
protected

◆ loadPointValidIndicesBuffer_()

MRVIEWER_API RenderBufferRef< VertId > MR::RenderMeshObject::loadPointValidIndicesBuffer_ ( )
protected

◆ loadTexturePerFaceTextureBuffer_()

MRVIEWER_API RenderBufferRef< uint8_t > MR::RenderMeshObject::loadTexturePerFaceTextureBuffer_ ( )
protected

◆ loadVertColorsBuffer_()

MRVIEWER_API RenderBufferRef< Color > MR::RenderMeshObject::loadVertColorsBuffer_ ( )
protected

◆ loadVertNormalsBuffer_()

MRVIEWER_API RenderBufferRef< Vector3f > MR::RenderMeshObject::loadVertNormalsBuffer_ ( )
protected

◆ loadVertPosBuffer_()

MRVIEWER_API RenderBufferRef< Vector3f > MR::RenderMeshObject::loadVertPosBuffer_ ( )
protected

◆ loadVertUVBuffer_()

MRVIEWER_API RenderBufferRef< UVCoord > MR::RenderMeshObject::loadVertUVBuffer_ ( )
protected

◆ render()

virtual MRVIEWER_API bool MR::RenderMeshObject::render ( const ModelRenderParams & params)
overridevirtual

◆ renderEdges_()

virtual MRVIEWER_API void MR::RenderMeshObject::renderEdges_ ( const ModelRenderParams & parameters,
bool alphaSort,
GLuint vao,
const Color & color,
uint32_t dirtyFlag )
protectedvirtual

◆ renderMeshEdges_()

virtual MRVIEWER_API void MR::RenderMeshObject::renderMeshEdges_ ( const ModelRenderParams & parameters,
bool alphaSort )
protectedvirtual

◆ renderMeshVerts_()

virtual MRVIEWER_API void MR::RenderMeshObject::renderMeshVerts_ ( const ModelRenderParams & parameters,
bool alphaSort )
protectedvirtual

◆ renderPicker()

virtual MRVIEWER_API void MR::RenderMeshObject::renderPicker ( const ModelBaseRenderParams & params,
unsigned geomId )
overridevirtual

◆ update_()

virtual MRVIEWER_API void MR::RenderMeshObject::update_ ( ViewportMask mask)
protectedvirtual

Member Data Documentation

◆ borderArrayObjId_

GLuint MR::RenderMeshObject::borderArrayObjId_ { 0 }
protected

◆ borderBuffer_

GlBuffer MR::RenderMeshObject::borderBuffer_
protected

◆ bordersSize_

int MR::RenderMeshObject::bordersSize_ { 0 }
protected

◆ borderTexture_

GlTexture2 MR::RenderMeshObject::borderTexture_
protected

◆ cornerMode

bool MR::RenderMeshObject::cornerMode = false
protected

◆ dirty_

uint32_t MR::RenderMeshObject::dirty_ { 0 }
protected

◆ dirtyEdges_

bool MR::RenderMeshObject::dirtyEdges_ { false }
protected

◆ dirtyPointPos_

bool MR::RenderMeshObject::dirtyPointPos_ = false
protected

◆ edgesArrayObjId_

GLuint MR::RenderMeshObject::edgesArrayObjId_ { 0 }
protected

◆ edgeSize_

int MR::RenderMeshObject::edgeSize_ { 0 }
protected

◆ edgesTexture_

GlTexture2 MR::RenderMeshObject::edgesTexture_
protected

◆ emptyLinesColorTexture_

GlTexture2 MR::RenderMeshObject::emptyLinesColorTexture_
protected

◆ emptyVertsColorTexture_

GlTexture2 MR::RenderMeshObject::emptyVertsColorTexture_
protected

◆ faceColorsTex_

GlTexture2 MR::RenderMeshObject::faceColorsTex_
protected

◆ faceIndicesSize_

int MR::RenderMeshObject::faceIndicesSize_ { 0 }
protected

◆ faceNormalsTextureSize_

Vector2i MR::RenderMeshObject::faceNormalsTextureSize_
protected

◆ faceSelectionTex_

GlTexture2 MR::RenderMeshObject::faceSelectionTex_
protected

◆ faceSelectionTextureSize_

Vector2i MR::RenderMeshObject::faceSelectionTextureSize_
protected

◆ facesIndicesBuffer_

GlBuffer MR::RenderMeshObject::facesIndicesBuffer_
protected

◆ facesNormalsTex_

GlTexture2 MR::RenderMeshObject::facesNormalsTex_
protected

◆ maxTexSize_

int MR::RenderMeshObject::maxTexSize_ { 0 }
protected

◆ meshArrayObjId_

GLuint MR::RenderMeshObject::meshArrayObjId_ { 0 }
protected

◆ meshPickerArrayObjId_

GLuint MR::RenderMeshObject::meshPickerArrayObjId_ { 0 }
protected

◆ objMesh_

const ObjectMeshHolder* MR::RenderMeshObject::objMesh_
protected

◆ pointsArrayObjId_

GLuint MR::RenderMeshObject::pointsArrayObjId_ { 0 }
protected

◆ pointSize_

int MR::RenderMeshObject::pointSize_ { 0 }
protected

◆ pointValidBuffer_

GlBuffer MR::RenderMeshObject::pointValidBuffer_
protected

◆ pointValidSize_

int MR::RenderMeshObject::pointValidSize_ { 0 }
protected

◆ selectedEdgesArrayObjId_

GLuint MR::RenderMeshObject::selectedEdgesArrayObjId_ { 0 }
protected

◆ selectedEdgesBuffer_

GlBuffer MR::RenderMeshObject::selectedEdgesBuffer_
protected

◆ selEdgeSize_

int MR::RenderMeshObject::selEdgeSize_ { 0 }
protected

◆ selEdgesTexture_

GlTexture2 MR::RenderMeshObject::selEdgesTexture_
protected

◆ textureArray_

GlTexture2DArray MR::RenderMeshObject::textureArray_
protected

◆ texturePerFace_

GlTexture2 MR::RenderMeshObject::texturePerFace_
protected

◆ texturePerFaceSize_

Vector2i MR::RenderMeshObject::texturePerFaceSize_
protected

◆ vertColorsBuffer_

GlBuffer MR::RenderMeshObject::vertColorsBuffer_
protected

◆ vertColorsSize_

int MR::RenderMeshObject::vertColorsSize_ { 0 }
protected

◆ vertNormalsBuffer_

GlBuffer MR::RenderMeshObject::vertNormalsBuffer_
protected

◆ vertNormalsSize_

int MR::RenderMeshObject::vertNormalsSize_ { 0 }
protected

◆ vertPosBuffer_

GlBuffer MR::RenderMeshObject::vertPosBuffer_
protected

◆ vertPosSize_

int MR::RenderMeshObject::vertPosSize_ { 0 }
protected

◆ vertUVBuffer_

GlBuffer MR::RenderMeshObject::vertUVBuffer_
protected

◆ vertUVSize_

int MR::RenderMeshObject::vertUVSize_ { 0 }
protected

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