[vtkusers] translucent trouble with external OpenGL render window

Ken Martin ken.martin at kitware.com
Thu Mar 10 19:10:16 EST 2016


In 6.2 VTK used old style fixed pipeline OpenGL where glEnable(GL_LIGHTING)
did something. In the new backend those commands have no impact on the
rendering (aside from the external light code that acts as a translator).
A fair amount has changed so you may bump into other oddities. Also be
aware if you are creating the opengl Context that the new backend really
wants OpenGL 3.2 or later. On some systems you can get away with asking for
an old generic context and it will give you something that supports OpenGL
3.2 (nvidia I suspect), on other platforms it will not (OSX I would bet).

Thanks
Ken




On Thu, Mar 10, 2016 at 6:15 PM, Mike Guttman <mguttman at yahoo.com> wrote:

> BAM!  That was it.
>
> I added a default vtkExternalLight and turned on lights in the GL world
> and it works fine now.
>
> Perhaps in 6.2 it created a default light.
>
> In initializeGL(), set up default light:
>   vtkNew<vtkExternalLight> light;
>   renderer->AddExternalLight(light.GetPointer());
>
> Then, to turn on the lighting:
>   glEnable(GL_LIGHTING);
>   glEnable(GL_LIGHT0);
>
> And turn it off:
>   glDisable(GL_LIGHTING);
>
> Thank you!!
>
> -Mike
>
>
>
>
> On Mar 10, 2016, at 1:36 PM, Aashish Chaudhary <
> aashish.chaudhary at kitware.com> wrote:
>
> Hi Mike,
>
> One of the thing we do in external framework is get rid of default lights.
> So you would have to add lights to VTK yourself. Sankhesh might have more
> information on it (cc'd)
>
> - aashish
>
> On Thu, Mar 10, 2016 at 1:31 PM, Ken Martin <ken.martin at kitware.com>
> wrote:
>
> What does it look like in 7.0 when you set your opacity to 1.0 instead of
> 0.7?
>
> On Thu, Mar 10, 2016 at 1:17 PM, mguttman via vtkusers <vtkusers at vtk.org>
> wrote:
>
> Hi, Just wanted to attach my nabble presence to this post, since it seemed
> anonymous on nabble and not visible on markmail. I really hope there is a
> migration path for me from 6.2/OpenGL1. A simple surface rendering of
> polygon data in an vtkExternalOpenGLRenderWindow became much worse going
> from 6.2/OpenGL1 to 6.3/OpenGL2 (see the two pictures). I've spent an
> embarrassing amount of time on this, when I should be writing, and I'm not
> sure what to try next. Many thanks in advance, Mike
> http://vtk.1045678.n5.nabble.com/attachment/5737114/1/vtk6.2-opengl1.jpg
> http://vtk.1045678.n5.nabble.com/attachment/5737114/0/vtk6.3-opengl2-externwidget.jpg
> ------------------------------
> View this message in context: Re: translucent trouble with external
> OpenGL render window
> <http://vtk.1045678.n5.nabble.com/translucent-trouble-with-external-OpenGL-render-window-tp5737114p5737157.html>
> Sent from the VTK - Users mailing list archive
> <http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html> at Nabble.com.
>
> _______________________________________________
> 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
>
>
>
>
> --
> Ken Martin PhD
> Chairman & CFO
> Kitware Inc.
> 28 Corporate Drive
> Clifton Park NY 12065
> 518 371 3971
>
> This communication, including all attachments, contains confidential and
> legally privileged information, and it is intended only for the use of the
> addressee.  Access to this email by anyone else is unauthorized. If you are
> not the intended recipient, any disclosure, copying, distribution or any
> action taken in reliance on it is prohibited and may be unlawful. If you
> received this communication in error please notify us immediately and
> destroy the original message.  Thank you.
>
> _______________________________________________
> 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
>
>
>
>
> --
>
>
>
> *| Aashish Chaudhary | Technical Leader         | Kitware Inc.            *
> *| http://www.kitware.com/company/team/chaudhary.html
> <http://www.kitware.com/company/team/chaudhary.html>*
>
>
>


-- 
Ken Martin PhD
Chairman & CFO
Kitware Inc.
28 Corporate Drive
Clifton Park NY 12065
518 371 3971

This communication, including all attachments, contains confidential and
legally privileged information, and it is intended only for the use of the
addressee.  Access to this email by anyone else is unauthorized. If you are
not the intended recipient, any disclosure, copying, distribution or any
action taken in reliance on it is prohibited and may be unlawful. If you
received this communication in error please notify us immediately and
destroy the original message.  Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160310/2c4d7f4d/attachment.html>


More information about the vtkusers mailing list