[vtkusers] VTK Stereo Rendering capability
Ruf
ruf2811 at gmail.com
Fri Feb 11 19:16:58 EST 2011
Hi,
I am a new user of VTK, I am using a NVIDIA 3d Vision kit, a PNY Quadro 600
graphics card with an Alienware AW2310 3d-ready display. I am facing
problems in rendering a simple cone in 3D. Is there any special setting
required to be done, while running the application. Does it need a
fullscreen mode for the stereoscopic display.
The below is my sample code:
//-----------------------------------------------
#include "vtkActor.h"
#include "vtkConeSource.h"
#include "vtkPolyData.h"
#include "vtkPolyDataMapper.h"
#include "vtkRenderWindow.h"
#include "vtkRenderWindowInteractor.h"
#include "vtkRenderer.h"
int main( int argc, char *argv[] )
{
vtkRenderer *renderer = vtkRenderer::New();
vtkRenderWindow *renWin = vtkRenderWindow::New();
renWin->AddRenderer(renderer);
vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();
iren->SetRenderWindow(renWin);
vtkConeSource *cone = vtkConeSource::New();
cone->SetResolution(6);
vtkPolyDataMapper *coneMapper = vtkPolyDataMapper::New();
coneMapper->SetInputConnection(cone->GetOutputPort());
vtkActor *coneActor = vtkActor::New();
coneActor->SetMapper(coneMapper);
renderer->AddActor(coneActor);
renderer->SetBackground(0,0,0);
renWin->SetSize(300,300);
renWin->StereoCapableWindowOn(1);
renWin->SetStereoTypeToCrystalEyes();
renWin->StereoRenderOn();
// interact with data
renWin->Render();
iren->Start();
// Clean up
renderer->Delete();
renWin->Delete();
iren->Delete();
cone->Delete();
coneMapper->Delete();
coneActor->Delete();
return 0;
}
//-----------------------------------------------
Any help would be appreciated.
Thanks and Regards,
Reena
--
View this message in context: http://vtk.1045678.n5.nabble.com/VTK-Stereo-Rendering-capability-tp3382286p3382286.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list