[vtkusers] Getting back OpenGL Context after data display/visualization using VTK

Aashish Chaudhary aashish.chaudhary at kitware.com
Thu Mar 8 13:21:44 EST 2012


On Thu, Mar 8, 2012 at 1:08 PM, Rudra Poudel <emailrudra at yahoo.com> wrote:

> Hi Aashish,
>
> Thanks, just want to make sure I understood what you mean,
>
> My program LOOP {
> Step 1- I have FBO for main logic processing-  this step working fine
> Step 2- I want to use VTK for my results visualization only, then close
> all visualization windows
> Step 3- Again would like to work with my FBO here- BUMP- ERROR- FBO is
> invalid due to STEP 2
> }
>
> Now my questions again,
> 1. Aashish you mean- if I will do/call Step 2 then I could not make FBO
> work in Step 3? There must be some solution, isn't? The reason I am asking
> this question is I dont like to write my own code for visualization
> (re-inventing the wheel :( )
>

I see..if I understood your correctly, then between step 2 and 3 you would
need to make your context current


> 2. Can I build VTK without OpenGL support?
>
> Not sure what you mean here? If you want to use VTK for rendering you have
to use OpenGL (you can use Mesa), if you are using VTK for reading file,
data filtering etc, then
you don't need to use OpenGL.


> Many thanks,
>


> Rudra
>
>   ------------------------------
> *From:* Aashish Chaudhary <aashish.chaudhary at kitware.com>
> *To:* Rudra Poudel <emailrudra at yahoo.com>
> *Cc:* "vtkusers at vtk.org" <vtkusers at vtk.org>
> *Sent:* Thursday, March 8, 2012 5:29 PM
> *Subject:* Re: [vtkusers] Getting back OpenGL Context after data
> display/visualization using VTK
>
> On Thu, Mar 8, 2012 at 11:36 AM, Rudra Poudel <emailrudra at yahoo.com>wrote:
>
> Hi All,
>
> - My application has Frame Buffer Object (FBO) for off-screen rendering (
> I used GLUT to init OpenGL Context- i.e. trick of invisible GLUT window)
> - When I display/visualize data using VTK function/class as obviously it
> take-over/create-new OpenGL context
> - Then I delete all VTK related functions/classes
> - Now when I tried to work with FBO it does-not-work/has-invalid-state.
>
>
> Since the FBO is created in different context you cannot use it in your
> glut context unless you created a shared FBO. It is bit tricky but doable.
>
>
> Questions,
> 1. What is the best/easiest solution to get back OpenGL Context after data
> display/visualization using VTK?
>
>
>
> 2. Might be building VTK without OpenGL support- however this looks
> impossible or ...?
>
>
> If you are using VTK for data filtering, sources then you can build your
> app where rendering is done only by your code obviously widget's wont work
> then.
>
>
>
>
> Thank you so much,
> Rudra
>
> _______________________________________________
> 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
>
>
>
>
> --
> | Aashish Chaudhary
> | R&D Engineer
> | Kitware Inc.
> | www.kitware.com
>
>
>


-- 
| Aashish Chaudhary
| R&D Engineer
| Kitware Inc.
| www.kitware.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120308/428a541a/attachment.htm>


More information about the vtkusers mailing list