[vtkusers] Texture Mapping in OpenGL

Randall Hopper aa8vb at yahoo.com
Wed Aug 2 08:21:58 EDT 2000


     I have a texture map (.TIF) and an object file (.OBJ) with texture
coordinates.  If I bring up the OBJ with the texture map in Maya it
displays fine, but in VTK the texture doesn't display correctly.

     In the file, the 450x512 texture is correct.  In VTK, half of the
texture is missing (black), and the other half is shifted on the dataset.
I'm using vtkImageConstantPad to pad up to 512x512, and using
vtkTransformTextureCoords to scale the texture coordinates for this pad.

     Any other VTKer's padding textures for OpenGL and gotten their
textures to sync-up correctly?  If you have a code snippet for the pad and
tcoords transform you could post I'd appreciate it.

Thanks,

Randall




More information about the vtkusers mailing list