<br><div class="gmail_quote">On Thu, Mar 8, 2012 at 1:33 PM, Rudra Poudel <span dir="ltr"><<a href="mailto:emailrudra@yahoo.com">emailrudra@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div style="font-size:12pt;font-family:times new roman,new york,times,serif"><div><span>Hi Aashish,</span></div><div><span><br></span></div><div><span>Exactly, I need to set my application's OpenGL context to current between step 2 and 3. </span></div>
<div><span>But as I have created OpenGL context with GLUT, I could not get/set using GLUT.</span></div></div></div></blockquote><div><br></div><div>I don't remember glut that much now, but if you are using freeglut, you can probably find the code where it is making context specific calls, and you can probably add an API for your use case? </div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-size:12pt;font-family:times new roman,new york,times,serif"><div><span>And I dont like to use X window (I am currently on Ubuntu 11.10) as much as possible for platform independent sake.</span></div>
</div></div></blockquote><div><br></div><div>Sure, I will look at the glut code </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-size:12pt;font-family:times new roman,new york,times,serif">
<div><span><br></span></div><div><span>Now please tell me how to do that? OR what is the best possible solution for above problem?</span></div><div><span><br></span></div><div><span>Many thanks,</span></div><div><span>Rudra </span></div>
<div><br></div> <div style="font-size:12pt;font-family:'times new roman','new york',times,serif"> <div> <div dir="ltr"> <font face="Arial"><div class="im"> <hr size="1"> <b><span style="font-weight:bold">From:</span></b> Aashish Chaudhary <<a href="mailto:aashish.chaudhary@kitware.com" target="_blank">aashish.chaudhary@kitware.com</a>><br>
<b><span style="font-weight:bold">To:</span></b> Rudra Poudel <<a href="mailto:emailrudra@yahoo.com" target="_blank">emailrudra@yahoo.com</a>> <br><b><span style="font-weight:bold">Cc:</span></b> "<a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a>" <<a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a>> <br>
</div><b><span style="font-weight:bold">Sent:</span></b> Thursday, March 8, 2012 6:21 PM<div><div class="h5"><br> <b><span style="font-weight:bold">Subject:</span></b> Re: [vtkusers] Getting back OpenGL Context after data display/visualization using VTK<br>
</div></div></font> </div><div><div class="h5"> <br>
<div><div>On Thu, Mar 8, 2012 at 1:08 PM, Rudra Poudel <span dir="ltr"><<a rel="nofollow" href="mailto:emailrudra@yahoo.com" target="_blank">emailrudra@yahoo.com</a>></span> wrote:<br><blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div style="font-size:12pt;font-family:'times new roman','new york',times,serif"><div><span>Hi Aashish,</span></div><div><span><br></span></div><div><span>Thanks, just want to make sure I understood what you mean,</span></div>
<div><br></div><div>My program LOOP {</div><div>Step 1- I have FBO for main logic processing- this step working fine</div><div>Step 2- I want to use VTK for my results visualization only, then close all visualization windows</div>
<div>Step 3- Again would like to work with my FBO here- BUMP- ERROR- FBO is invalid due to STEP 2</div><div>}</div><div><br></div><div>Now my questions again,</div><div><span>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 :( )</span></div>
</div></div></blockquote><div><br></div><div>I see..if I understood your correctly, then between step 2 and 3 you would need to make your context current</div><div> </div><blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div style="font-size:12pt;font-family:'times new roman','new york',times,serif"><div><span>2. Can I build VTK
without OpenGL support?</span></div><div><br></div></div></div></blockquote><div>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 </div>
<div>you don't need to use OpenGL. </div><div> </div><blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-size:12pt;font-family:'times new roman','new york',times,serif">
<div>Many thanks,</div></div></div></blockquote><div> </div><blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-size:12pt;font-family:'times new roman','new york',times,serif">
<div>Rudra</div><div><br></div><div> </div><div style="font-size:12pt"><div> </div><div style="font-size:12pt">
<div> <div dir="ltr"> <font face="Arial"> <hr size="1"> <b><span style="font-weight:bold">From:</span></b> Aashish Chaudhary <<a rel="nofollow" href="mailto:aashish.chaudhary@kitware.com" target="_blank">aashish.chaudhary@kitware.com</a>><br>
<b><span style="font-weight:bold">To:</span></b> Rudra Poudel <<a rel="nofollow" href="mailto:emailrudra@yahoo.com" target="_blank">emailrudra@yahoo.com</a>> <br><b><span style="font-weight:bold">Cc:</span></b> "<a rel="nofollow" href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a>" <<a rel="nofollow" href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a>> <br>
<b><span style="font-weight:bold">Sent:</span></b> Thursday, March 8, 2012 5:29 PM<br> <b><span style="font-weight:bold">Subject:</span></b> Re: [vtkusers] Getting back OpenGL Context after data display/visualization using VTK<br>
</font> </div></div><div><div> <br>
<div><div>On Thu, Mar 8, 2012 at 11:36 AM, Rudra Poudel <span dir="ltr"><<a rel="nofollow" href="mailto:emailrudra@yahoo.com" target="_blank">emailrudra@yahoo.com</a>></span> wrote:<br><blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div style="font-size:12pt"><div><div><font face="'times new roman', 'new york', times, serif">Hi All, </font></div><div><font face="'times new roman', 'new york', times, serif"><br>
</font></div><div><span>- 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) </span><br>
</div><div><font face="'times new roman', 'new york', times, serif">- When I display/visualize data using VTK function/class as obviously it take-over/create-new OpenGL context </font></div><div><font face="'times new roman', 'new york', times, serif">- Then I delete all VTK related functions/classes</font></div>
<div><font face="'times new roman', 'new york', times, serif">- Now when I tried to work with FBO it
does-not-work/has-invalid-state. </font></div></div></div></div></blockquote><div><br></div><div>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. </div>
<blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-size:12pt"><div><div><font face="'times new roman', 'new york', times, serif"><br>
</font></div><div><font face="'times new roman', 'new york', times, serif">Questions, </font></div><div><font face="'times new roman', 'new york', times, serif">1. What is the best/easiest solution to get back OpenGL Context after data display/visualization using VTK? </font></div>
</div></div></div></blockquote><div> </div><blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-size:12pt">
<div><div><font face="'times new roman', 'new york', times, serif">2. Might be building VTK without OpenGL support- however this looks impossible or ...? </font></div></div></div></div></blockquote><div><br>
</div><div>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. </div><div><br></div><div> </div><blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div style="font-size:12pt"><div><div><font face="'times new roman', 'new york', times, serif"><br></font></div><div><font face="'times new roman', 'new york', times, serif">Thank you so much, </font></div>
<span><font color="#888888"><div><font face="'times new roman', 'new york', times, serif">Rudra</font></div></font></span></div></div></div><br>_______________________________________________<br>
Powered by <a rel="nofollow" href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>| Aashish Chaudhary <br>| R&D Engineer <br>| Kitware Inc. <br>| <a rel="nofollow" href="http://www.kitware.com" target="_blank">www.kitware.com</a> <br>
</div><br><br> </div></div></div> </div> </div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>| Aashish Chaudhary <br>| R&D Engineer <br>| Kitware Inc. <br>| <a rel="nofollow" href="http://www.kitware.com" target="_blank">www.kitware.com</a> <br>
</div><br><br> </div></div></div> </div> </div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>| Aashish Chaudhary <br>| R&D Engineer <br>| Kitware Inc. <br>| <a href="http://www.kitware.com">www.kitware.com</a> <br>