public TextureFormat(TexturePixelStorage format, uint size, uint flags, int glFormat) { this.Format = format; this.Size = size; this.Flags = flags; this.GLFormat = glFormat; }
public static uint CalculateChecksum(byte *address, uint width, uint height, TexturePixelStorage format) { TextureFormat textureFormat = TextureFormats[( int )format]; uint size = textureFormat.Size; if (size == 0) { size = 1; width /= 2; } uint checksum = 0; uint stride = width * size; // Offset a bit address += stride / 2; stride *= ChecksumSpacing; for (int n = 0; n < (height / ChecksumSpacing); n++) { checksum += *(( uint * )address); address += stride; } return(checksum); }
public TextureFormat(TexturePixelStorage format, uint size) { Format = format; Size = size; }