[vtkusers] Disable warning about "does not support stereo"

Alex Malyushytskyy alexmalvtk at gmail.com
Tue Sep 3 22:17:43 EDT 2013


Sorry I do not know of the way how to disable specific warning,
but this warning comes from  void vtkRenderWindow::SetStereoRender(int
stereo)

it would be called from
vtkInteractorStyle::OnChar()


You may subclass vtkInteractorStyle you use -
(for example vtkInteractorStyleTrackballCamera ), override
  virtual void OnChar();

Something like below will work:

//--------------------------------------------------------------------------
void vtkInteractorStyleRubberBand::OnChar()
{
   switch (this->Interactor->GetKeyCode())
   {
     case '3':
         vtkObject::GlobalWarningDisplayOff();
         this->Superclass::OnChar();
         vtkObject::GlobalWarningDisplayOn();
         return;
   }
    this->Superclass::OnChar();
}


Basically you are not guaranteed that other warnings which may happen are
enabled, but you limit time warnings are disabled.



Alex




On Mon, Sep 2, 2013 at 12:51 PM, Mengda Wu <wumengda at gmail.com> wrote:

> Hi All,
>
>    Is there away to disable this warning message?
>
> Warning: In ..\..\Rendering\vtkRenderWindow.cxx, line 236
> vtkWin32OpenGLRenderWindow (0000000010C070D0): Adjusting stereo mode on a
> window that does not support stereo type CrystalEyes is not possible.
>
>   I always get this message when pressing key '3' in the vtk window. I
> know my screen does not support stereo. I also know that I can globally
> disable all warnings using the static function
> vtkObject::GlobalWarningDisplayOff(). But I would like to keep warned of
> other errors.
>
> Thanks,
> Mengda
>
>
> _______________________________________________
> 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
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130903/b1c93252/attachment.htm>


More information about the vtkusers mailing list