Exemplo n.º 1
0
        /// <summary>
        /// Fill the specified rows of all textures. Return whether the last row was filled.
        /// </summary>
        /// <returns>Whether filling is done.</returns>
        /// <param name="buffers">Pixel buffers.</param>
        /// <param name="rowIndex">Row index to start from.</param>
        /// <param name="rowCount">How many rows to fill.</param>
        public bool FillRows(Color[][] buffers, ref int rowIndex, int rowCount)
        {
            if (diagram.isCubemap)
            {
                diagram.cubemapDirection = currentDirection;
            }
            int height = diagram.isCubemap ? textureSettings.width : textureSettings.height;

            rowIndex = diagram.FillRows(buffers, textureSettings.width, height, rowIndex, rowCount);
            if (rowIndex >= height)
            {
                if (diagram.isCubemap)
                {
                    rowIndex = 0;
                    AssignCubemapFaces(buffers);
                    if (currentDirection == CubemapFace.NegativeZ)
                    {
                        return(true);
                    }
                    currentDirection += 1;
                }
                else
                {
                    return(true);
                }
            }
            return(false);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Fill the specified rows of all textures. Return whether the last row was filled.
 /// </summary>
 /// <returns>Whether filling is done.</returns>
 /// <param name="buffers">Pixel buffers.</param>
 /// <param name="rowIndex">Row index to start from.</param>
 /// <param name="rowCount">How many rows to fill.</param>
 public bool FillRows(Color[][] buffers, ref int rowIndex, int rowCount)
 {
     rowIndex = diagram.FillRows(buffers, textureSettings.width, textureSettings.height, rowIndex, rowCount);
     return(rowIndex >= textureSettings.height);
 }