Public Class tga Structure headerinfo Dim header() As Byte End Structure Structure Texturest Dim imageData As Byte Dim bpp As Integer Dim width As Integer Dim height As Integer Dim texid As Integer Dim type As Integer End Structure Structure TGA Dim header() As Byte Dim bytesperpixel As Integer Dim imagesize As Integer Dim imageheight As Integer Dim imagewidth As Integer Dim type As Integer Dim bpp As Integer End Structure Public Function loadTga(ByVal TexStruc As Texturest, ByVal Path As String) Dim MyFile As IO.FileInfo = New IO.FileInfo(Path) Dim reader As IO.Stream Dim myheader As headerinfo = New headerinfo If MyFile.Exists Then reader = MyFile.OpenRead If reader.CanRead Then reader.Read(myheader.header, 0, 12) End If End If End FunctionEnd Class
here is what i have so far, does it look like i am on the right track? The reading i think should be easy, it was the structures and things i was confused on.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement