Offscreen rendering

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Offscreen rendering

Julien Finet
Hi,

What is the current best practice to have VTK with offscreen rendering support on Windows and with an NVidia card ? Mesa ? EGL ? Other ?

Thanks,
Julien.

_______________________________________________
Powered by www.kitware.com

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

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/vtk-developers

Reply | Threaded
Open this post in threaded view
|

Re: Offscreen rendering

Ken Martin
In vtk master I think the answer for all of those is to call OffScreenRenderingOn() prior to the first render.  Or after the first render to call

ShowWindow(false)
UseOffScreenBuffers(true)




On Thu, Nov 22, 2018 at 8:10 AM Julien Finet <[hidden email]> wrote:
Hi,

What is the current best practice to have VTK with offscreen rendering support on Windows and with an NVidia card ? Mesa ? EGL ? Other ?

Thanks,
Julien.
_______________________________________________
Powered by www.kitware.com

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

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/vtk-developers



--
Ken Martin PhD
Distinguished Engineer
Kitware Inc.
101 East Weaver Street
Carrboro, North Carolina
27510 USA

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

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/vtk-developers

Reply | Threaded
Open this post in threaded view
|

Re: Offscreen rendering

Prabhu Ramachandran-3
On 11/23/18 10:01 AM, Ken Martin wrote:
In vtk master I think the answer for all of those is to call OffScreenRenderingOn() prior to the first render.  Or after the first render to call

ShowWindow(false)
UseOffScreenBuffers(true)


I see that you've centralized some of the code recently but you still need to enable EGL or Mesa at build time, and that can still be a bit tricky, right?

Would it at all be possible to support one VTK build that has all the possible options available?  i.e. EGL, OSMesa, and the normal backend?  Or is that simply impossible to do on all platforms?  Would it make sense to bundle OSMesa with VTK?  At least on Linux this would make many things very convenient.

Regards,

Prabhu


_______________________________________________
Powered by www.kitware.com

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

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/vtk-developers

Reply | Threaded
Open this post in threaded view
|

Re: Offscreen rendering

Ken Martin
OffScreen does not require EGL or Mesa.  You should be able to do offscreen with any opengl implementation.

When folks mention offscreen, sometimes they mean "rendering without an xserver" or "rendering on a system without opengl 3.2"  for those cases you can use EGL or Mesa or OSMesa depending on the issue. 

In terms of putting it all into one there is some OpenGL initiative to support this (I forget the name, gl virtual dispatch maybe) which could handle it I think. Failing that you can do the test at runtime and then dynamically load osmesa/mesa etc as needed. Some folks do that. I agree having it built in and automatically selected would be nice. Not sure how difficult it is though.



On Sat, Nov 24, 2018 at 2:59 PM Prabhu Ramachandran <[hidden email]> wrote:
On 11/23/18 10:01 AM, Ken Martin wrote:
In vtk master I think the answer for all of those is to call OffScreenRenderingOn() prior to the first render.  Or after the first render to call

ShowWindow(false)
UseOffScreenBuffers(true)


I see that you've centralized some of the code recently but you still need to enable EGL or Mesa at build time, and that can still be a bit tricky, right?

Would it at all be possible to support one VTK build that has all the possible options available?  i.e. EGL, OSMesa, and the normal backend?  Or is that simply impossible to do on all platforms?  Would it make sense to bundle OSMesa with VTK?  At least on Linux this would make many things very convenient.

Regards,

Prabhu



--
Ken Martin PhD
Distinguished Engineer
Kitware Inc.
101 East Weaver Street
Carrboro, North Carolina
27510 USA

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

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/vtk-developers

Reply | Threaded
Open this post in threaded view
|

Re: Offscreen rendering

Prabhu Ramachandran-3
On 11/24/18 5:10 PM, Ken Martin wrote:
OffScreen does not require EGL or Mesa.  You should be able to do offscreen with any opengl implementation.

When folks mention offscreen, sometimes they mean "rendering without an xserver" or "rendering on a system without opengl 3.2"  for those cases you can use EGL or Mesa or OSMesa depending on the issue.

Sorry that is what I meant, most of the use cases I've seen for off screen are typically for cases where having an xserver or any windowing system is not desired.


In terms of putting it all into one there is some OpenGL initiative to support this (I forget the name, gl virtual dispatch maybe) which could handle it I think. Failing that you can do the test at runtime and then dynamically load osmesa/mesa etc as needed. Some folks do that. I agree having it built in and automatically selected would be nice. Not sure how difficult it is though.

Thanks for the clarification!

cheers,

Prabhu


_______________________________________________
Powered by www.kitware.com

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

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/vtk-developers

Reply | Threaded
Open this post in threaded view
|

Re: Offscreen rendering

Julien Finet
In reply to this post by Ken Martin
Thanks Ken for the detailed explanation. It is helpful.

Julien.

On Sat, Nov 24, 2018 at 11:10 PM Ken Martin <[hidden email]> wrote:
OffScreen does not require EGL or Mesa.  You should be able to do offscreen with any opengl implementation.

When folks mention offscreen, sometimes they mean "rendering without an xserver" or "rendering on a system without opengl 3.2"  for those cases you can use EGL or Mesa or OSMesa depending on the issue. 

In terms of putting it all into one there is some OpenGL initiative to support this (I forget the name, gl virtual dispatch maybe) which could handle it I think. Failing that you can do the test at runtime and then dynamically load osmesa/mesa etc as needed. Some folks do that. I agree having it built in and automatically selected would be nice. Not sure how difficult it is though.



On Sat, Nov 24, 2018 at 2:59 PM Prabhu Ramachandran <[hidden email]> wrote:
On 11/23/18 10:01 AM, Ken Martin wrote:
In vtk master I think the answer for all of those is to call OffScreenRenderingOn() prior to the first render.  Or after the first render to call

ShowWindow(false)
UseOffScreenBuffers(true)


I see that you've centralized some of the code recently but you still need to enable EGL or Mesa at build time, and that can still be a bit tricky, right?

Would it at all be possible to support one VTK build that has all the possible options available?  i.e. EGL, OSMesa, and the normal backend?  Or is that simply impossible to do on all platforms?  Would it make sense to bundle OSMesa with VTK?  At least on Linux this would make many things very convenient.

Regards,

Prabhu



--
Ken Martin PhD
Distinguished Engineer
Kitware Inc.
101 East Weaver Street
Carrboro, North Carolina
27510 USA

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

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/vtk-developers