[vtkusers] vtkAssembly rendering for haptics

T.Lim at hw.ac.uk T.Lim at hw.ac.uk
Wed Jun 8 10:27:52 EDT 2005


Hi,

Has anyone come across this error:

vtkOpenGLPolyDataMapper (00f377b0): FillOutputPortInformation is not 
implemented

when rendering an actor in an vtkAssembly using for example,

oglActor->GetMapper()->Render(oglRenderer, oglActor);

However, when rendering using,

oglActor->Render(oglRenderer, oglActor->GetMapper());

no errors occur.

My question is why does this happen? And what is the difference between the 
2 render methods?

I've used vtkOpenGL_xxx where possible.

In my application for Haptics, i need to be able to pass vtk polydata 
geometry to OpenGL for haptic rendering. 

Would like to hear from others who have managed to implement vtk with 
OpenHaptics on how to pass geometry for haptic rendering.

Many thanks in advance,
Theo.


My test of vtkAssembly is as follows:

//............

int main ()
{

vtkConeSource *cone = vtkConeSource::New();
vtkOpenGLPolyDataMapper *oglMapper = vtkOpenGLPolyDataMapper::New();
vtkOpenGLActor *oglActor = vtkOpenGLActor::New();

oglMapper->SetInput(cone->GetOutput());
oglActor->SetMapper(oglMapper);

vtkAssembly *assembly = vtkAssembly::New();
assembly->AddPart(oglActor);

vtkOpenGLRenderer *oglRenderer = vtkOpenGLRenderer::New();
oglRenderer->AddActor(assembly);

vtkWin32OpenGLRenderWindow *oglRenWin = vtkWin32OpenGLRenderWindow::New();
oglRenWin->AddRenderer(oglRenderer);
oglRenWin->SetSize(400,400);

vtkRenderWindowInteractor *iRen = vtkRenderWindowInteractor::New();
iRen->SetRenderWindow(oglRenWin);

// render cone
/* Error occur */
oglActor->GetMapper()->Render(oglRenderer, oglActor);

/* No error -- why? */
//oglActor->Render(oglRenderer, oglActor->GetMapper());

iRen->Initialize();
iRen->Start();

cone->Delete();
oglMapper->Delete();
oglActor->Delete();
assembly->Delete();
oglRenderer->Delete();
oglRenWin->Delete();
iRen->Delete();

}











-------------------------------------------------------------------
DISCLAIMER

This message is subject to http://www.hw.ac.uk/disclaim.htm 

-------------------------------------------------------------------




More information about the vtkusers mailing list