[vtk-developers] vtkGenericOpenGLRenderWindow thoughts
Clinton Stimpson
clinton at elemtech.com
Tue May 25 14:18:49 EDT 2010
On Tuesday, May 25, 2010 11:39:12 am Francois Bertel wrote:
> Hi,
>
> Can you please elaborate about the OpenGL functionality in Qt you want to
> use?
Here's a description and video of the types of things one can do:
http://labs.trolltech.com/blogs/2008/12/02/widgets-enter-the-third-dimension-
wolfenqt/
http://labs.trolltech.com/blogs/2010/05/17/qtwebkit-now-accelerates-css-
animations-3d-transforms/
Basically, there are some cool things one can do with Qt and OpenGL, I want to
include VTK in the mix. This type of integration has been asked for a few
times on the VTK users list to support 2/2.5d scenes, but 3d is also possible.
Qt's drawing api allows for multiple back ends, including OpenGL and OpenGL
2.0 (desktop or ES). But Qt can't replace functionality found in a toolkit
like VTK, so I'm looking for ways to integrate.
>
> How would you do a vtkGenericOpenGLRenderWindow? How to pass context
> information? How would you implement MakeCurrent(), for example?
My vtkGenericOpenGLRenderWindow was just a prototype and it could go a
different way. Its purpose would be to embed a VTK scene within a Qt scene.
MakeCurrent() is stubbed (along with the majority of the pure virtual
functions), and the caller of vtkGenericRenderWindow::Render() makes the
context current.
Clint
>
> On Tue, May 25, 2010 at 1:27 PM, Clinton Stimpson <clinton at elemtech.com>
wrote:
> > Hi,
> >
> > Does anyone see any issues with having a class
> > vtkGenericOpenGLRenderWindow in VTK which would allow one to render a
> > VTK scene into a drawable & context of their own?
> >
> > The reason I'm looking at this is because there is a great deal of OpenGL
> > functionality in Qt that can easily be used with this approach. The code
> > in interest is not in a public api and is accessible only through using
> > Qt's classes that manage drawables and contexts.
> >
> > I wonder if it'll be an issue as I'm seeing code in vtkCameraPass::Render
> > that checks if its drawing to a framebuffer object, when it couldn't
> > know if it is drawing to a framebuffer object created on the Qt side.
> >
> > Any thoughts?
> >
> > Thanks,
> > Clint
> > _______________________________________________
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.vtk.org/mailman/listinfo/vtk-developers
More information about the vtk-developers
mailing list