Loading a texture?

BlitzMax Forums/BlitzMax OpenGL Programming/Loading a texture?

hang on.. try this:
	Method LoadTexture(file:String)
		Local tex:TPixmap = LoadPixmap(file)	
		If tex
			self.texture = GLTexFromPixmap(tex)
			glBindTexture(GL_TEXTURE_2D, texture)
			self.CalcNormals()
		Else
			DebugLog "texture: " + file + " load fail!"
		EndIf
	EndMethod

never mind the calcnormals thingy.. (unless you have a function doing that)