[vtkusers] Importing images drawn into a memory based device context (DC) into VTK

John Biddiscombe jbiddiscombe at skippingmouse.co.uk
Thu May 6 06:54:37 EDT 2004


>> 2- Import the background map as an image into the VTK
>> pipeline. (How can
>> I do this if the image is drawn into memory which I only have a device
>> context (DC) pointer to?)
>Do not know that... But maybe you can make the image as a texture
>and use a vtkPlaneSource, set it somewhere in the back and take
>away all mouse interaction with it ?? This actually reminds me, that
>I need this kind of behaviour ;)
>

Add a method to vtkOpenGlRenderWindow like
SetBackgroundImage(byte*, int width, int height)....

Then do a copy of the image to the gl context before rendering, but after
clearing the back buffer (or use it to clear the back buffer directly if it
fills the window)

I'm looking at similar things, because I'm rendering to an offscreen
Hardware accelerated pBuffer to generate an image, and then want to inject
this image into the vtk pipeline, possibly as a texture, possibly as a depth
map etc. There is scope for adding some new functionalities to the
renderwindow.

Anyone done any of this already?

JB




More information about the vtkusers mailing list