Can only draw text to integer positions?
by Ken Pajala · in Torque Game Builder · 07/11/2006 (8:31 pm) · 2 replies
I just started fooling around with fonts, and they're quite cool so far, especially combined with the T2D Text Display Class.
My one gripe is that it seems that you're forced to only draw to integer positions since dglDrawText() and such only accept integer points, so slowly sliding text across the screen looks very jerky. It was easy enough to modify the functions to take float points, especially since the actual rendering converts everything to float anyway , but I don't understand why the functions would limit themselves to integer positions in the first place.
Just puzzled is all...
My one gripe is that it seems that you're forced to only draw to integer positions since dglDrawText() and such only accept integer points, so slowly sliding text across the screen looks very jerky. It was easy enough to modify the functions to take float points, especially since the actual rendering converts everything to float anyway , but I don't understand why the functions would limit themselves to integer positions in the first place.
Just puzzled is all...
#2
07/12/2006 (10:45 am)
I think you'll have an easier time of this modifying the dglDrawText function and using the world matrix to change the position. As you said it does align things to integers, but it could probably be modified very easily. I suggest the matrix approach because that should eliminate the issues with the slivers getting cut off of letters.
Torque Owner Ken Pajala