Example #1
0
        override protected byte[] ToCoreMipTexturePixelAtIndex(GenericImage image, IGLDataFormat dataFormat, int mipIndex, int pixelIndex, int channelIndex)
        {
            long offset = pixelIndex * image.channels;

            if (channelIndex == 0)
            {
                return(dataFormat.ToCoreFormat(image.mipmapLevels[mipIndex].pixels, (int)offset, 2, (int)image.channels));
            }
            else if (channelIndex == 2)
            {
                return(dataFormat.ToCoreFormat(image.mipmapLevels[mipIndex].pixels, (int)offset, 0, (int)image.channels));
            }
            else
            {
                return(dataFormat.ToCoreFormat(image.mipmapLevels[mipIndex].pixels, (int)offset, channelIndex, (int)image.channels));
            }
        }
Example #2
0
        virtual protected byte[] ToCoreMipTexturePixelAtIndex(GenericImage image, IGLDataFormat dataFormat, int mipIndex, int pixelIndex, int channelIndex)
        {
            long offset = pixelIndex * image.channels;

            return(dataFormat.ToCoreFormat(image.mipmapLevels[mipIndex].pixels, (int)offset, channelIndex, (int)image.channels));
        }