override protected double ToGenericImagePixelAtPixel(CoreTexture texture, IGLDataFormat dataFormat, int mipIndex, int pixelIndex, int channelIndex) { long offset = pixelIndex * dataFormat.PixelSize(Channels); if (channelIndex == 0) { return(dataFormat.ToGenericFormat(texture.mipmapLevels[mipIndex].pixels, (int)offset, 2, Channels)); } else if (channelIndex == 2) { return(dataFormat.ToGenericFormat(texture.mipmapLevels[mipIndex].pixels, (int)offset, 0, Channels)); } else { return(dataFormat.ToGenericFormat(texture.mipmapLevels[mipIndex].pixels, (int)offset, channelIndex, Channels)); } }
virtual protected double ToGenericImagePixelAtPixel(CoreTexture texture, IGLDataFormat dataFormat, int mipIndex, int pixelIndex, int channelIndex) { long offset = pixelIndex * dataFormat.PixelSize(Channels); return(dataFormat.ToGenericFormat(texture.mipmapLevels[mipIndex].pixels, (int)offset, channelIndex, Channels)); }