The capability ALLOW_COLOR_INDEX_WRITE cannot be set in the constructor. See the 
documentation for IndexedGeometryArray for what format values can be set in the 
constructor.

The format values are ORed together in the constructor and if you look at the values 
of the format constants, you will set that ALLOW_COLOR_INDEX_WRITE and COLOR_4 both 
equal 12. So, the bit-value for COLOR_4 is set when using ALLOW_COLOR_INDEX_WRITE in 
the constructor.

Sean

> -----Original Message-----
> From: hwu [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 11, 2003 2:18 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [JAVA3D] QUESTION urgent
> 
> 
> Please help me about the following questing.
> 
> The following call of tfa.setColors() in Line10 will result in an
> exception
> "GeometryArray: must be in COLOR_3 mode to use this method".
> However if I delete the Line3, it works.
> 
> I really do not understand, even I do not delete Line3, the 
> mode COLOR_3
> is set in Line4? Why exception?
> 
> 
> Line1: tfa = new IndexedTriangleFanArray(  26 ,
> Line2:  IndexedTriangleFanArray.COORDINATES|
> Line3:  IndexedTriangleFanArray.ALLOW_COLOR_INDEX_WRITE|
> Line4:  IndexedTriangleFanArray.COLOR_3,
> Line5           vertexCount ,
> Line6:      triangleFanVertexCount ) ;
> 
> Line7: tfa.setCoordinates( 0 , coors ) ;
> 
> Line8: colors = new Color3f[26] ;
> Line9: .....
> Line10: tfa.setColors( 0 , colors );
> 
> ==============================================================
> =============
> To unsubscribe, send email to [EMAIL PROTECTED] and 
> include in the body
> of the message "signoff JAVA3D-INTEREST".  For general help, 
> send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
> 

==========================================================================To 
unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to