Skip to main content
GameDev.net gamedev.net
🔒 Locked

Some more texture problems

Started by AndyEsser Dec 13, 2005 at 7:04 PM 0 replies 250+ views
Original Post
AndyEsser
AndyEsser
I got my texture problem fixed from the last time, however it's created a new one. The code i'm using is below


Public Function LoadGLTextures() As Boolean
    Dim glTexture
    Dim glTexX As Integer
    Dim glTexY As Integer
    Dim filepath
    Dim test

    ReDim gaTextures(1)
    filepath = App.Path & "\Data\test1.BMP"
    If Dir(filepath) <> "" Then
        glGenTextures 1, gaTextures(0)
        glBindTexture GL_TEXTURE_2D, gaTextures(0)
        glTexImage2D GL_TEXTURE_2D, 0, 3, 64, 64, 0, GL_RGB, GL_UNSIGNED_BYTE, LoadPicture(filepath)
        glTexParameteri GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR
        glTexParameteri GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR
    Else
        MsgBox "Texture Not Found: " & filepath, vbCritical
    End If
  
  LoadGLTextures = True
End Function


I know it's a very botched way of doing it, with no error protection whatsoever, but i just needed to get this working. If you have any ideas, t'would be much appreciated. It results in an image shown at: http://www.essersoft.com/images/screen.jpg

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.