Advertisement

tga

Started by September 11, 2004 04:26 PM
10 comments, last by davcaw 20 years, 2 months ago
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.

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
so i have got it to load in the data from the tga, but how do i pass the image data to opengl?

This topic is closed to new replies.

Advertisement