[vtkusers] Incompatibility with vtkTextMapper on Windows ?

Vincent Nicolas vnic at gmx.fr
Sat Apr 3 09:06:37 EST 2004


Hi all, 

I'm having big problems using vtkTextMapper on Windows with the mingw compiler !

I make a simple test code, only to show a text with the TextMapper class. On linux, everything work ok, but on Windows, it return an Exception fault in the vtkftgl.dll file ! 
However, it  compiles fine and work fine with Visual Studio and the binary files found on VTK website ... so I think the problem should come from the mingw compilation of VTK ...
All other classes work fine ! Even classes which uses OpenGL such as Raycast ... 

Is someone had already faced such problem ?
Or any problem with the compilation of vtkftgl with mingw or cygwin compilers ? 

Any suggestion will be welcome ...  ! 


Here is my code, I've tried it with VTK 4.2, 4.4.

int main(int argc, char *argv[])
{
	vtkTextMapper* TextMapper = vtkTextMapper::New();
	vtkTextActor* TextActor = vtkTextActor::New();
	vtkTextProperty* TextProperty = vtkTextProperty::New();
		
	TextProperty->SetColor(1.,1.,1.);
	TextProperty->SetFontSize(24);
	TextMapper->SetInput("Hello World !");
	TextActor->SetMapper(TextMapper);
	TextActor->SetTextProperty(TextProperty);
	
		
	vtkRenderer* ren = vtkRenderer::New();
	vtkRenderWindow* renWin = vtkRenderWindow::New();
    vtkRenderWindowInteractor* iren = vtkRenderWindowInteractor::New();
    renWin->AddRenderer(ren);
    iren->SetRenderWindow(renWin);

    ren->SetBackground(0.2,0.5,0.3);
    ren->AddActor(TextActor);
    renWin->Render();
    iren->Start();	
  return 0;
}


Best Regards,

Vincent Nicolas
-----------------------------------------
Communications and Remote Sensing Lab.
Universite catholique de Louvain
vincent.nicolas at tele.ucl.ac.be
+32 (0)10 478555
http://www.tele.ucl.ac.be



More information about the vtkusers mailing list