' Updates:
' 30/01/07 - Text

Type TBlitz2D

	Function Text(x,y,text$)
	
		' reset texture matrix
		glMatrixMode(GL_TEXTURE)		
		glLoadIdentity()
			
		' set active texture to texture 0 so gldrawtext will work correctly
		glActiveTextureARB(GL_TEXTURE0)
		glClientActiveTextureARB(GL_TEXTURE0)
		
		' enable texture 2D
		glEnable(GL_TEXTURE_2D)
		
		glDisable(GL_LIGHTING)
		
		glColor3f(1.0,1.0,1.0)
		
		' enable blend to hide text background
		glEnable(GL_BLEND)
		
		GLDrawText text$,x,y
		
		glDisable(GL_BLEND)
		
		glEnable(GL_LIGHTING)
		
		' disable texture 2D - needed as gldrawtext enables it, but doesn't disable after use
		glDisable(GL_TEXTURE_2D)
		
	End Function
	
	Function MouseXSpeed()
		Global oldmx
		Local mxs=MouseX()-oldmx
		oldmx=MouseX()
		Return mxs
	End Function
	
	Function MouseYSpeed()
		Global oldmy
		Local mys=MouseY()-oldmy
		oldmy=MouseY()
		Return mys
	End Function
	
End Type




