void buildTexture()
{
buffer.Lock( BufferLocking.Discard );
PixelBox pb = buffer.CurrentLock;
int idx = reactorExtent + 1;
unsafe
{
fixed ( int* chem_0 = chemical[ 0 ] )
{
for ( int y = 0; y < ( reactorExtent - 2 ); y++ )
{
uint* data = ( (uint*)pb.Data ) + y * pb.RowPitch;
int* chem = &chem_0[ idx ];
for ( int x = 0; x < ( reactorExtent - 2 ); x++ )
{
data[ x ] = clut[ ( chem[ x ] >> 6 ) & 1023 ];
}
idx += reactorExtent;
}
}
}
buffer.Unlock();
}
// GUI updaters