Hello folks!
Here is an opportunity to create Text objects https://love2d.org/wiki/love.graphics.newText
instead of drawing text every frame with https://love2d.org/wiki/love.graphics.printf
Used it a dozen times and it really improves performance.
But I don't understand what exactly a Text object is?
Pixel buffer like canvas? Set of glyphs and coordinates? Or something else?
Is it ok to store hundreds of paged text with Text object, created for every "page"?
As far as I see with https://love2d.org/wiki/love.graphics.getStats
it does not increase vram consumption, but maybe here is some other issues?
What is Text object?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
-
- Party member
- Posts: 730
- Joined: Sat Apr 26, 2014 7:46 pm
Re: What is Text object?
I believe it is like a sprite batch or mesh of sorts that batch the calls so that all of the text is drawn only once
Re: What is Text object?
Thanks! That's a good idea! I will believe it that too
Re: What is Text object?
I don't know much about the inner workings of Love2D but I suspect that the text object is a vertex buffer with UV information mapped with the rasterized font texture (spaced/kerned accordingly). It probably does consume a little bit of VRAM.
Who is online
Users browsing this forum: Bing [Bot] and 68 guests