[vtkusers] translucent trouble with external OpenGL render window
Aashish Chaudhary
aashish.chaudhary at kitware.com
Thu Mar 10 21:54:57 EST 2016
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);
>
>
Yup, you will need that since in the ExternalRender we do this:
if (light)
{
if (!status)
{
// This is the case when we have a VTK light in the scene but no
// external light corresponding to that index in the context.
// In this case, we remove the VTK light as well.
light->SwitchOff();
this->RemoveLight(light);
// No need to go forward
continue;
}
}
Thanks,
Aashish
> 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>*
>
>
>
--
*| Aashish Chaudhary | Technical Leader | Kitware Inc. *
*| http://www.kitware.com/company/team/chaudhary.html
<http://www.kitware.com/company/team/chaudhary.html>*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160310/77302e1d/attachment.html>
More information about the vtkusers
mailing list