<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>Re: Problem using vtkTexture - it doesn't show! </TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=2 FACE="Arial">Hi again!</FONT>
<BR><FONT SIZE=2 FACE="Arial">Sorry - I forgot to mention that I also add the texture object to an actor.</FONT>
<BR><FONT SIZE=2 FACE="Arial">And I should have included the code in my previous post. Here it is:</FONT>
</P>
<P> <FONT SIZE=2 FACE="Arial">p_oImageData = vtkImageData::New();</FONT>
<BR> <FONT SIZE=2 FACE="Arial">p_oUCArray = vtkUnsignedCharArray::New();</FONT>
<BR> <FONT SIZE=2 FACE="Arial">p_oImageData->SetDimensions (800,600,1);</FONT>
<BR>
<BR> <FONT SIZE=2 FACE="Arial">//p_fTextureImage is a float array containing my texture</FONT>
</P>
<P> <FONT SIZE=2 FACE="Arial">p_oUCArray->SetArray((unsigned char *)p_fTextureImage, cropdim, 1); </FONT>
<BR> <FONT SIZE=2 FACE="Arial">p_oImageData->GetPointData()->SetScalars(p_oUCArray);</FONT>
<BR> <FONT SIZE=2 FACE="Arial">p_oTexturePntr->SetInput(p_oImageData);</FONT>
</P>
<P> <FONT SIZE=2 FACE="Arial">.</FONT>
<BR> <FONT SIZE=2 FACE="Arial">.</FONT>
<BR> <FONT SIZE=2 FACE="Arial">.</FONT>
<BR> <FONT SIZE=2 FACE="Arial">.</FONT>
</P>
<P> <FONT SIZE=2 FACE="Arial">Actor->SetTexture(p_oTexturePntr)</FONT>
</P>
<BR>
<P><FONT SIZE=2 FACE="Arial">/Erik</FONT>
<BR><FONT SIZE=2 FACE="Arial">###########################################<BR>
<BR>
This message has been scanned by F-Secure Anti-Virus for Microsoft Exchange.<BR>
For more information, connect to <A HREF="http://www.F-Secure.com/" TARGET="_blank">http://www.F-Secure.com/</A></FONT>
</P>
</BODY>
</HTML>