L B Posted September 15, 2010 Share Posted September 15, 2010 In LE3, I'd like to see some Object-Oriented font working, instead of always only current. Example: DrawText(string text, Font font, int x, int y); I've found it particularly needed when making an interface with multiple components. I did try to make an OO hack around it with our headers, but it's incredibly slow. (Or even better, with a Vector4 color parameter.) Quote Link to comment Share on other sites More sharing options...
Rick Posted September 16, 2010 Share Posted September 16, 2010 Why would it be slow? What did the code look like? Quote Link to comment Share on other sites More sharing options...
ZioRed Posted September 16, 2010 Share Posted September 16, 2010 +1 I agree with this, possibly creating a TFont class where we can set everything (name, size [if possible, it's a pain to do DDS for each font size we need], color, styles [italic/underline/bold even all at once]). The only addition of Vector4 color is not enough for me, since it saves only one line of code. Quote ?? FRANCESCO CROCETTI ?? http://skaredcreations.com Link to comment Share on other sites More sharing options...
saboteur Posted September 16, 2010 Share Posted September 16, 2010 I'll add the possiblity of draw text over a texture, or manage text like a texture. So, you could make 3D Huds. Quote WINDOWS 10 - UBUNTU 20.04 - [iNTEL i5-3330] [16GB RAM] [NVIDIA GTX 1050ti] Link to comment Share on other sites More sharing options...
L B Posted September 16, 2010 Author Share Posted September 16, 2010 Why would it be slow? What did the code look like? In C#: CustomDrawText(string text, Font font, int x, int y) { Font old = Font.Current; Font.Current = font; Core.DrawString(text, x, y); Font.Current = old; } (P.S.: getting the current font requires .NET headers/the custom engine Dll) I don't know why it's slow, but it ate all my FPS. I was at < 1 FPS. Quote Link to comment Share on other sites More sharing options...
Josh Posted October 28, 2010 Share Posted October 28, 2010 Agreed: GraphicsDriver::DrawText( text, x, y, font ) Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.