Original Post
Hello, I am writting about a known subject but I would appriciate if you could help me because I'm desperate with texture loading with Tao.Devil. My code is :
Function DevILTextureLoader(ByVal texture As Integer, ByVal filename As String, ByVal m_width As Double, ByVal m_height As Double) As Integer
If (gIsDevILInitialized = False) Then
Il.ilInit()
Ilu.iluInit()
Il.ilEnable(Il.IL_ORIGIN_SET)
Il.ilOriginFunc(Il.IL_ORIGIN_LOWER_LEFT)
Il.ilEnable(Il.IL_TYPE_SET)
Il.ilTypeFunc(Il.IL_UNSIGNED_BYTE)
Il.ilEnable(Il.IL_FORMAT_SET)
Il.ilFormatFunc(Il.IL_RGB)
Ilut.ilutRenderer(Ilut.ILUT_WIN32)
gIsDevILInitialized = True
End If
Dim ImgId As Integer = 0
Il.ilGenImages(1, ImgId)
Il.ilBindImage(ImgId)
texture = Ilut.ilutGLLoadImage(filename)
m_width = Il.ilGetInteger(Il.IL_IMAGE_WIDTH)
m_height = Il.ilGetInteger(Il.IL_IMAGE_HEIGHT)
Il.ilBindImage(0)
Il.ilDeleteImage(ImgId)
Return texture
End Function
Thank you