[ rant ] Found this after spending 2 hours trying to make a label appear on screen [ /rant ]
If text resolution factor is 1, the label text won't be rendered: on labels, buttons, speech, etc.
NOTE: for some reason it is still drawn in the Features window.
Steps to reproduce:
Open DemoGame project and find Run method in DemoStarter class.
Comment out following lines:
//Rendering the text at a 4 time higher resolution than the actual game, so it will still look sharp when maximizing the window.
GLText.TextResolutionFactorX = 4;
GLText.TextResolutionFactorY = 4;
Alternatively, replace 4 with 1.
Run the game. No text will be visible on screen.
On possible reasons:
I think there is something wrong with algorithm in GLLabelRenderer.updateBoundingBoxes:
resolutionMatches = AGSModelMatrixComponent.GetVirtualResolution(false, _virtualResolution, drawable,
textScaleFactor, out hitTestResolutionFactor,
out resolution);
If resolutionMatches is false (which only happens if TextResolutionFactor is not 1), then the text eventually gets drawn on bitmap. If it is true (TextResolutionFactor is 1), then only measurement pass is made, and actual drawing never happens.
[ rant ] Found this after spending 2 hours trying to make a label appear on screen [ /rant ]
If text resolution factor is 1, the label text won't be rendered: on labels, buttons, speech, etc. NOTE: for some reason it is still drawn in the Features window.
Steps to reproduce:
Alternatively, replace 4 with 1.
On possible reasons: I think there is something wrong with algorithm in GLLabelRenderer.updateBoundingBoxes:
If resolutionMatches is false (which only happens if TextResolutionFactor is not 1), then the text eventually gets drawn on bitmap. If it is true (TextResolutionFactor is 1), then only measurement pass is made, and actual drawing never happens.