In games or CAD software, we often display a two-dimensional image that is always user oriented next to the target to represent certain identities. VTK uses Vtkfollower to implement this feature, however, VTK7.1 and the following version of the bug, showing the use of vtkfollower, two-dimensional images can not render, only display a pure white rectangular box.
The solution must be to use Bing or valley Harmony brother to search, the original post site in: http://vtk.1045678.n5.nabble.com/possible-bug-in-vtk-7-1-OpenGL2-td5739717.html. Here the VTK owner indicates that the render function of the cxx source file for Vtkfollower writes a piece of code:
/* Render the texture * *
/if (this->texture)
{
this->texture->render (ren);
No code to render the two-dimensional tile
Fortunately the solution is relatively simple, add one line of code to the above code:
/* Render the texture *
/if (this->texture)
{
this->texture->render (ren);
}
This->device->settexture (This->gettexture ())//new code to add
Then recompile VTK engineering files, generate LIB files, put into their own projects, you can achieve always user-oriented two-dimensional image tag.