[vtkusers] Incompatibility with vtkTextMapper on Windows ?

Vincent Nicolas vincent.nicolas at tele.ucl.ac.be
Mon Apr 5 14:42:17 EDT 2004


On Mon, 05 Apr 2004 11:23:39 -0400
Mathieu Malaterre <mathieu.malaterre at kitware.com> wrote:

> Vincent,
> 
> 	Could you send us the test you used to demonstrate the problem ?
> 
> Thanks
> Mathieu

The simple test code was in my first post, it a simple use of the vtkTextActor and vtkTextMapper classes. 

Here it is :

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;
}

I trace the bug simply with printed Debug messages, and a lot of other "cout << "some message" << endl;". I stopped at second line of FTCharmap::CharIndex(...) ... where it call charMap.find(index) ... in the FTGL_DO_NOT_USE_STL... as I tried using STL before continue and it works.
This bug only happend when using mingw cross-compiler (on linux platform with windows target) and maybe mingw or cygwin compiler (on windows platform). But it works good with MSVC and Linux.

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