Merge branch 'devel' of https://github.com/cnr-isti-vclab/vcglib into devel
This commit is contained in:
commit
597e2592aa
|
@ -338,7 +338,7 @@ namespace vcg
|
||||||
/*************************************************************************************************************************************************************************/
|
/*************************************************************************************************************************************************************************/
|
||||||
|
|
||||||
NotThreadSafeGLMeshAttributesMultiViewerBOManager(/*const*/ MESH_TYPE& mesh, MemoryInfo& meminfo, size_t perbatchprimitives)
|
NotThreadSafeGLMeshAttributesMultiViewerBOManager(/*const*/ MESH_TYPE& mesh, MemoryInfo& meminfo, size_t perbatchprimitives)
|
||||||
:_mesh(mesh), _gpumeminfo(meminfo), _bo(INT_ATT_NAMES::enumArity(), NULL), _currallocatedboatt(), _perbatchprim(perbatchprimitives), _chunkmap(), _borendering(false), _edge(), _meshverticeswhenedgeindiceswerecomputed(0), _meshtriangleswhenedgeindiceswerecomputed(0), _tr(), _debugmode(false), _loginfo(), _meaningfulattsperprimitive(PR_ARITY, InternalRendAtts())
|
:_mesh(mesh), _gpumeminfo(meminfo), _bo(INT_ATT_NAMES::enumArity(), NULL), _currallocatedboatt(), _borendering(false), _perbatchprim(perbatchprimitives), _chunkmap(), _edge(), _meshverticeswhenedgeindiceswerecomputed(0), _meshtriangleswhenedgeindiceswerecomputed(0), _tr(), _debugmode(false), _loginfo(), _meaningfulattsperprimitive(PR_ARITY, InternalRendAtts())
|
||||||
{
|
{
|
||||||
_tr.SetIdentity();
|
_tr.SetIdentity();
|
||||||
_bo[INT_ATT_NAMES::ATT_VERTPOSITION] = new GLBufferObject(3, GL_FLOAT, GL_VERTEX_ARRAY, GL_ARRAY_BUFFER);
|
_bo[INT_ATT_NAMES::ATT_VERTPOSITION] = new GLBufferObject(3, GL_FLOAT, GL_VERTEX_ARRAY, GL_ARRAY_BUFFER);
|
||||||
|
@ -635,7 +635,7 @@ namespace vcg
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
bool meshchanged = ((_mesh.FN() != _meshtriangleswhenedgeindiceswerecomputed) || (_mesh.VN() != _meshverticeswhenedgeindiceswerecomputed));
|
bool meshchanged = ((size_t(_mesh.FN()) != _meshtriangleswhenedgeindiceswerecomputed) || (size_t(_mesh.VN()) != _meshverticeswhenedgeindiceswerecomputed));
|
||||||
tobedeallocated[INT_ATT_NAMES::ATT_EDGEINDICES] = (notempty && !hasmeshattribute) ||
|
tobedeallocated[INT_ATT_NAMES::ATT_EDGEINDICES] = (notempty && !hasmeshattribute) ||
|
||||||
(notempty && !meaningfulrequiredbyatleastoneview[INT_ATT_NAMES::ATT_EDGEINDICES]) ||
|
(notempty && !meaningfulrequiredbyatleastoneview[INT_ATT_NAMES::ATT_EDGEINDICES]) ||
|
||||||
(notempty && !(isvalid) && meshchanged);
|
(notempty && !(isvalid) && meshchanged);
|
||||||
|
@ -1089,10 +1089,10 @@ namespace vcg
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if ((faceind == tn - 1) || (chunkindex == facechunk - 1))
|
if ((faceind == int(tn - 1)) || (chunkindex == size_t(facechunk - 1) ))
|
||||||
{
|
{
|
||||||
size_t chunksize = facechunk;
|
size_t chunksize = facechunk;
|
||||||
if (faceind == tn - 1)
|
if (faceind == int(tn - 1))
|
||||||
chunksize = chunkindex + 1;
|
chunksize = chunkindex + 1;
|
||||||
|
|
||||||
if (attributestobeupdated[INT_ATT_NAMES::ATT_VERTPOSITION])
|
if (attributestobeupdated[INT_ATT_NAMES::ATT_VERTPOSITION])
|
||||||
|
@ -1480,7 +1480,7 @@ namespace vcg
|
||||||
glEnable(GL_TEXTURE_2D);
|
glEnable(GL_TEXTURE_2D);
|
||||||
for (std::vector< std::pair<short, GLuint> >::const_iterator it = _texindnumtriangles.begin(); it != _texindnumtriangles.end(); ++it)
|
for (std::vector< std::pair<short, GLuint> >::const_iterator it = _texindnumtriangles.begin(); it != _texindnumtriangles.end(); ++it)
|
||||||
{
|
{
|
||||||
if ((it->first != -1) && (it->first < textureindex.size()))
|
if ((int(it->first) != -1) && (size_t(it->first) < textureindex.size()))
|
||||||
glBindTexture(GL_TEXTURE_2D, textureindex[it->first]);
|
glBindTexture(GL_TEXTURE_2D, textureindex[it->first]);
|
||||||
else
|
else
|
||||||
glBindTexture(GL_TEXTURE_2D, 0);
|
glBindTexture(GL_TEXTURE_2D, 0);
|
||||||
|
@ -2295,12 +2295,12 @@ namespace vcg
|
||||||
struct GLBufferObject
|
struct GLBufferObject
|
||||||
{
|
{
|
||||||
GLBufferObject(size_t components, GLenum gltype, GLenum clientstatetag, GLenum target)
|
GLBufferObject(size_t components, GLenum gltype, GLenum clientstatetag, GLenum target)
|
||||||
:_size(0), _components(components), _isvalid(false), _gltype(gltype), _clientstatetag(clientstatetag), _target(target), _bohandle(0)
|
:_size(0), _components(components), _isvalid(false), _gltype(gltype), _target(target), _clientstatetag(clientstatetag), _bohandle(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
GLBufferObject(size_t components, GLenum gltype, GLenum target)
|
GLBufferObject(size_t components, GLenum gltype, GLenum target)
|
||||||
:_size(0), _components(components), _isvalid(false), _gltype(gltype), _clientstatetag(), _target(target), _bohandle(0)
|
:_size(0), _components(components), _isvalid(false), _gltype(gltype), _target(target), _clientstatetag(), _bohandle(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -244,7 +244,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef _I_REALLY_NEED_OLD_GL_PICK_
|
||||||
// Same of above but it also assumes that you want only visible faces.
|
// Same of above but it also assumes that you want only visible faces.
|
||||||
// Visibility is computed according to the current depth buffer.
|
// Visibility is computed according to the current depth buffer.
|
||||||
static int OldPickFaceVisible(int x, int y, MESH_TYPE &m, std::vector<FacePointer> &resultZ, int width=4, int height=4, bool sorted=true)
|
static int OldPickFaceVisible(int x, int y, MESH_TYPE &m, std::vector<FacePointer> &resultZ, int width=4, int height=4, bool sorted=true)
|
||||||
|
@ -289,7 +289,6 @@ public:
|
||||||
return resultZ.size();
|
return resultZ.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int OldPickFace(int x, int y, MESH_TYPE &m, std::vector<FacePointer> &result, int width=4, int height=4,bool sorted=true)
|
static int OldPickFace(int x, int y, MESH_TYPE &m, std::vector<FacePointer> &result, int width=4, int height=4,bool sorted=true)
|
||||||
{
|
{
|
||||||
result.clear();
|
result.clear();
|
||||||
|
@ -421,9 +420,10 @@ public:
|
||||||
delete [] selectBuf;
|
delete [] selectBuf;
|
||||||
return result.size();
|
return result.size();
|
||||||
}
|
}
|
||||||
|
#endif // _I_REALLY_NEED_OLD_GL_PICK_
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
} // end namespace vcg
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue