Skip to content

Instantly share code, notes, and snippets.

@cathode
Created August 9, 2013 04:55
Show Gist options
  • Save cathode/6191280 to your computer and use it in GitHub Desktop.
Save cathode/6191280 to your computer and use it in GitHub Desktop.
DataBuffer example
TGABitstreamHeader header;
header.IdLength = buffer.ReadByte();
header.ColorMapType = (TGAColorMapType)buffer.ReadByte();
header.ImageType = (TGAImageType)buffer.ReadByte();
header.ColorMapOrigin = buffer.ReadUInt16();
header.ColorMapLength = buffer.ReadUInt16();
header.ColorMapDepth = buffer.ReadByte();
header.XOrigin = buffer.ReadUInt16();
header.YOrigin = buffer.ReadUInt16();
header.Width = buffer.ReadUInt16();
header.Height = buffer.ReadUInt16();
header.BitsPerPixel = buffer.ReadByte();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment