[vtkusers] vtkOrientedGlyphContourRepresentation AlwaysOnTop
ysa0829
ysa0829 at gmail.com
Tue Apr 28 05:52:43 EDT 2015
Hi all,
in vtk 5.10 , I use the flag called "AlwaysOnTop" to keep contour always
show on top.
but in vtk 6.1 , the flag does not work.
I found out the flag is not valid .
vtk 5.10:
//==============================================//
int vtkOrientedGlyphContourRepresentation::RenderOpaqueGeometry(
vtkViewport *viewport)
{
// Since we know RenderOpaqueGeometry gets called first, will do the
// build here
this->BuildRepresentation();
GLboolean flag = GL_FALSE;
if ( this->AlwaysOnTop
&& (this->ActiveActor->GetVisibility() ||
this->LinesActor->GetVisibility()))
{
glGetBooleanv(GL_DEPTH_TEST,&flag);
if(flag)
{
glDisable( GL_DEPTH_TEST );
}
}
int count=0;
count += this->LinesActor->RenderOpaqueGeometry(viewport);
if ( this->Actor->GetVisibility() )
{
count += this->Actor->RenderOpaqueGeometry(viewport);
}
if ( this->ActiveActor->GetVisibility() )
{
count += this->ActiveActor->RenderOpaqueGeometry(viewport);
}
if(this->ShowSelectedNodes && this->SelectedNodesActor &&
this->SelectedNodesActor->GetVisibility())
{
count += this->SelectedNodesActor->RenderOpaqueGeometry(viewport);
}
if(flag && this->AlwaysOnTop
&& (this->ActiveActor->GetVisibility() ||
this->LinesActor->GetVisibility()))
{
glEnable( GL_DEPTH_TEST );
}
return count;
}
//==============================================//
vtk6.1 :
int vtkOrientedGlyphContourRepresentation::RenderOpaqueGeometry(
vtkViewport *viewport)
{
// Since we know RenderOpaqueGeometry gets called first, will do the
// build here
this->BuildRepresentation();
int count=0;
count += this->LinesActor->RenderOpaqueGeometry(viewport);
if ( this->Actor->GetVisibility() )
{
count += this->Actor->RenderOpaqueGeometry(viewport);
}
if ( this->ActiveActor->GetVisibility() )
{
count += this->ActiveActor->RenderOpaqueGeometry(viewport);
}
if(this->ShowSelectedNodes && this->SelectedNodesActor &&
this->SelectedNodesActor->GetVisibility())
{
count += this->SelectedNodesActor->RenderOpaqueGeometry(viewport);
}
return count;
}
Could anyone give me some suggestions , If I want to show contour on top?
--
View this message in context: http://vtk.1045678.n5.nabble.com/vtkOrientedGlyphContourRepresentation-AlwaysOnTop-tp5731654.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list