public override HardwarePixelBuffer GetBuffer( int face, int mipmap )
{
if ( face >= faceCount )
{
throw new IndexOutOfRangeException( string.Format( "Face index is out of range. Face : {0}, Facecount : {1}.", face, faceCount ) );
}
if ( mipmap > MipmapCount )
{
throw new IndexOutOfRangeException( string.Format( "Mipmap index is out of range. Mipmap : {0}, Mipmapcount : {1}.", mipmap, MipmapCount ) );
}
int idx = face * ( MipmapCount + 1 ) + mipmap;
Utilities.Contract.Requires( idx < _surfaceList.Count, String.Format( "[GLESTexture( Name={0} ) ] Index( {1} ) > Surfacelist.Count( {2} )", Name, idx, _surfaceList.Count ) );
return _surfaceList[ idx ];
}