Closed kevinfoley closed 6 years ago
Does the contentScaleFactor change when you go full screen? Textures are not automatically updated when the contentScaleFactor changes.
You could try setting updateSnapshotOnScaleChange to true on TextBlockTextRenderer. Be aware that this will cause your text renderers to check for scale changes every single frame, which could affect performance.
Yes, the contentScaleFactor
changes. Is there any solution which is less performance-intensive?
After looking through the code for TextBlockTextRenderer, it looks like the code you were referring to is in the render()
function. However, from testing with breakpoints, it seems like this isn't called every frame for static text. It gets called if the text moves/changes, or the state changes (e.g. when mouse hovers over the text). Does that sound right, or am I missing something?
Hmmm... you're right. I wrote that before skipUnchangedFrames was added to Starling. It should still work as described when skipUnchangedFrames is false, but scale changes won't be detected automatically anymore if skipUnchangedFrames is true.
@joshtynjala It works as desired when updateSnapshotOnScaleChange
is set to true, even if skipUnchangedFrames
is enabled. The text re-renders when going fullscreen.
Great! Perhaps Starling automatically calls setRequiresRedraw() when contentScaleFactor or the back buffer size changes.
Occurs in all versions of Feathers. Not tested with other text renderers.