mirror of
https://github.com/lucaspalomodevelop/meshlab.git
synced 2026-03-17 01:54:42 +00:00
img_patch_param: fix error when passing double data with GL_FLOAT
This commit is contained in:
parent
cc0b7a1d29
commit
2a683ec3ef
@ -29,15 +29,17 @@ VisibilityCheck* VisibilityCheck::s_Instance = NULL;
|
||||
|
||||
VisibilityCheck* VisibilityCheck::GetInstance( glw::Context &ctx )
|
||||
{
|
||||
if( !s_Instance )
|
||||
{
|
||||
if( VisibilityCheck_ShadowMap::isSupported() )
|
||||
s_Instance = new VisibilityCheck_ShadowMap( ctx );
|
||||
else if( VisibilityCheck_VMV2002::isSupported() )
|
||||
s_Instance = new VisibilityCheck_VMV2002( ctx );
|
||||
}
|
||||
if( !s_Instance )
|
||||
{
|
||||
if( VisibilityCheck_ShadowMap::isSupported() ){
|
||||
s_Instance = new VisibilityCheck_ShadowMap( ctx );
|
||||
}
|
||||
else if( VisibilityCheck_VMV2002::isSupported() ){
|
||||
s_Instance = new VisibilityCheck_VMV2002( ctx );
|
||||
}
|
||||
}
|
||||
|
||||
return s_Instance;
|
||||
return s_Instance;
|
||||
}
|
||||
|
||||
|
||||
@ -450,7 +452,7 @@ void VisibilityCheck_ShadowMap::initMeshTextures()
|
||||
{
|
||||
// Creates a first OpenGL texture into which normal vectors at each mesh vertex are stored.
|
||||
int mapH = (int) std::ceil( m_Mesh->vn / 2048.0f );
|
||||
Point3m *mapData = new Point3m [ 2048*mapH ];
|
||||
vcg::Point3f *mapData = new vcg::Point3f [ 2048*mapH ];
|
||||
|
||||
for( int i=0; i<m_Mesh->vn; ++i )
|
||||
mapData[i] = m_Mesh->vert[i].N();
|
||||
|
||||
@ -66,18 +66,18 @@ VisibleSet::VisibleSet(
|
||||
m_DepthRangeInv = 1.0f / (m_DepthMax-depthMin);
|
||||
|
||||
|
||||
foreach( RasterModel *rm, rasterList )
|
||||
for( RasterModel *rm : qAsConst(rasterList))
|
||||
{
|
||||
visibility.setRaster( rm );
|
||||
visibility.checkVisibility();
|
||||
|
||||
for( int f=0; f<mesh.fn; ++f )
|
||||
if( visibility.isFaceVisible(f) )
|
||||
{
|
||||
for( int f=0; f<mesh.fn; ++f ){
|
||||
if( visibility.isFaceVisible(f) ) {
|
||||
float w = getWeight( rm, mesh.face[f] );
|
||||
if( w >= 0.0f )
|
||||
m_FaceVis[f].add( w, rm );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
VisibilityCheck::ReleaseInstance();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user