vtkContextView: No text renderer available

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

vtkContextView: No text renderer available

vtkBeginner
Hi,
I am trying to get the example
http://www.vtk.org/gitweb?p=VTK.git;a=blob;f=Examples/Charts/Cxx/QScalarsToColors.cxx
running on my mac book (with retina display), osx 10.11.6,
Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin15.6.0
VTK 8.0.1, backend openGL
Qt 5.6.2

Build after adding
#include <vtkAutoInit.h>
VTK_MODULE_INIT(vtkRenderingOpenGL)
VTK_MODULE_INIT(vtkRenderingContextOpenGL)

The program runs, but the chart title and numbers at the axes are missing.
It continuously complains
ERROR: In /VTK/VTK-8.0.0/Rendering/ContextOpenGL/vtkOpenGLContextDevice2D.cxx, line 1470
vtkOpenGL2ContextDevice2D (0x7fb6d9c8a320): No text renderer available. Link to vtkRenderingFreeType to get the default implementation.

Additional, minor problem: the rubber band (right mouse button / ctrl+left button) seems to be displaced by half of the window size - probably the pixel density of the retina display is not recognized.

Any help how this can be fixed is appreciated - thanks !
Jorg
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: vtkContextView: No text renderer available

Allie Vacanti
On Fri, Aug 4, 2017 at 12:29 PM, vtkBeginner <[hidden email]> wrote:
> Link to vtkRenderingFreeType to get the default implementation.

Link to the vtkRenderingFreeType library to use text rendering in your
application.
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: vtkContextView: No text renderer available

vtkBeginner
Thanks Allie,
Unfortunately I still do not understand the linking problem: my .pro file comprises
LIBS += -L/usr/local/VTK/VTK-8.0.0/lib \ # folder to your VTK library
        -lvtkChartsCore-8.0 \  
        -lvtkCommonCore-8.0 \
        -lvtkGUISupportQt-8.0 \
        -lvtkCommonDataModel-8.0 \  
        -lvtkRenderingContext2D-8.0 \  
        -lvtkRenderingContextOpenGL-8.0 \
        -lvtkRenderingOpenGL-8.0 \
        -lvtkRenderingCore-8.0 \
        -lvtkRenderingLabel-8.0 \
        -lvtkViewsContext2D-8.0 \
        -lvtkRenderingFreeType-8.0

What else do I have to do in order to link to vtkRenderingFreeType?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: vtkContextView: No text renderer available

Allie Vacanti
On Tue, Aug 8, 2017 at 2:50 PM, vtkBeginner <[hidden email]> wrote:

> Thanks Allie,
> Unfortunately I still do not understand the linking problem: my .pro file
> comprises
> LIBS += -L/usr/local/VTK/VTK-8.0.0/lib \ # folder to your VTK library
>         -lvtkChartsCore-8.0 \
>         -lvtkCommonCore-8.0 \
>         -lvtkGUISupportQt-8.0 \
>         -lvtkCommonDataModel-8.0 \
>         -lvtkRenderingContext2D-8.0 \
>         -lvtkRenderingContextOpenGL-8.0 \
>         -lvtkRenderingOpenGL-8.0 \
>         -lvtkRenderingCore-8.0 \
>         -lvtkRenderingLabel-8.0 \
>         -lvtkViewsContext2D-8.0 \
>         -lvtkRenderingFreeType-8.0
>
> What else do I have to do in order to link to vtkRenderingFreeType?

I'm not terribly familiar with using VTK outside of CMake, but I think
what you have is correct for qmake.

The issue is that vtkRenderingFreeType provides an object-factory
override for the vtkTextRenderer class, but it's not getting
registered with the object factory at runtime. I believe this is what
the VTK_MODULE_INIT macros do (someone correct me if I'm wrong).

I think adding a VTK_MODULE_INIT(...) for each of the linked VTK
libraries should fix this.

HTH,
Allie
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: vtkContextView: No text renderer available

vtkBeginner
Thanks a lot ! VTK_MODULE_INIT(vtkRenderingFreeType) fixed it.
Jorg
Loading...