Version: v1.2.7.0 (MSFS 2024)
Frequency: Always
Severity: High BLOCKER
Similar MSFS 2020 issue: No
Context:NanoVG API not rendering data correctly (stretched images)
Attachments: None
Bug description:
Thank you for fixing the previous WASM loading package bug, which has enabled to move us further with MSFS 20204 compatibility, the fix and the expertise is much appreciated. Unfortunately a new issue has arisen:
This bug is new to MSFS 2024 patch 3 (v1.2.7.0), in our internal testing with past MSFS 2024 versions, we did not experience this bug at all, so this is a newly introduced bug.
Screenshot from MSFS 2024 showing the bug is at the bottom of this message!
This happens in WASM: after creating a bitmap using the provided GDI class, of size 650 by 768 pixels: nvgCreateImageRGBA (internally: fsRenderCreateTexture)
And then render it with: nvgUpdateImage (internally: fsRenderUpdateTexture), the MSFS display engine draws the image stretched (as shown in the image below), analyzing under the debugger, the nvgUpdateImage, calling renderGetTextureSize (internally: fsRenderGetTextureSize) returns an internal bitmap size of 652 x 768 pixels.
This bug could be related to some internal MSFS 2024 calculations being changed, it happens with other resolutions as well.
This is a core MSFS 2024 bug blocking our product completely. Could we please have an expedite fix on this bug so our users can use our product? It was frustrating to have to wait for the WASM loading bug to be fixed, only to be hit by a new bug.
It would be great if this bug can be released as a hotfix before the holidays.
Thank you and we are looking forward to your reply.
Best regards,
Tiberiu
TDS Sim Software
Repro steps:
gfx->DrawImage(g_BitmapGraphics.imageDrawing, 0.0f, 0.0f);
which on first step calls:
from nanovg.cpp nvgCreateImageRGBA with 650, 768px
then on each new draw, the same function:
gfx->DrawImage(g_BitmapGraphics.imageDrawing, 0.0f, 0.0f);
calls:
from nanovg.cpp nvgUpdateImage
intnerlly:
ctx->params.renderGetTextureSize(ctx->params.userPtr, image, &w, &h);
width is returned as 652(WRONG!!!)
height is returned as 768(correct)