Axiom.Core.ColorEx.ToArrayRGBA C# (CSharp) Method

ToArrayRGBA() public method

Populates the color components in a 4 elements array in RGBA order.
Primarily used to help in OpenGL.
public ToArrayRGBA ( float vals ) : void
vals float
return void
		public void ToArrayRGBA( float[] vals )
		{
			vals[ 0 ] = r;
			vals[ 1 ] = g;
			vals[ 2 ] = b;
			vals[ 3 ] = a;
		}

Usage Example

		public void WriteRawConstant( int physicalIndex, ColorEx color, int count )
#endif
		{
			// write either the number requested (for packed types) or up to 4
			var arr = new float[4];
			color.ToArrayRGBA( arr );
			_writeRawConstants( physicalIndex, arr, Utility.Min( count, 4 ) );
		}
All Usage Examples Of Axiom.Core.ColorEx::ToArrayRGBA