[vtkusers] Using OpenGL Textures with VTK

Aashish Chaudhary aashish.chaudhary at kitware.com
Mon Dec 20 09:11:42 EST 2010


I won't claim if I understood exactly what you are trying to do here but in
my understanding you want to bind GL texture objects already in memory to
VTK.  I don't know that you can do that without modifying VTK's vtkTexture
or vtkOpenGLTexture classes.


Now if you are using shader, this make it easier as you can just pass the
sampler id and if you know what object binds to what texture you can write a
very simple shader to achieve what you are trying to do.

Hope this helps.


On Mon, Dec 20, 2010 at 7:19 AM, David McKinnon <mckinnondavid at gmail.com>wrote:

> Hi,
>   I have a project where I have a managed collection of OpenGL textures.
> The textures all have unique identifiers (GLuint) and their various
> characteristics (GL_RGBA, width, height, etc) are stored in a set of
> classes.
>
> Is there some way that I can wrap these texture objects that are already
> stored on the GPU within one of the vtk classes such as vtkTexture or
> vtkTextureObject so that I might be able to display them in a
> vtkRenderWindow?
>
> If this is not possible is there some other example of binding OpenGL
> textures to a context so that they can be rendered within a window?
>
> Best Regards,
> David...
>
> _______________________________________________
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20101220/1e0daed9/attachment.htm>


More information about the vtkusers mailing list