desmume
desmume copied to clipboard
The Dark Spire (U) - Map and Wireframe rendering issues
Map does not render when pressing Y, although it does render when going to the main menu and selecting the Map option.
Switching rendering modes while in Y Map screen makes it appear, albeit with some differences between OpenGL and SoftRasterizer mode. It seems that the wireframe dungeon is being rendered undernearth/behind the Map, which is slightly transparent in the SoftRasterizer mode, it's a little hard to see but it's there.
This is further supported by the fact that switching the rendering modes back and forth quickly results in this:
...or sometimes this??? (the right half of the screen seems to be rendered on the left and vice-versa)
In Modern mode it's just a black screen:

Wireframe rendering in OpenGL:
around a corner (wall in front and right of it are missing)
looking at a corner wall (wall in front and right are missing)
looking at a wall (all walls missing)
Turning results in a series of random individual pixels being rendered each frame:

Wireframe rendering in SoftRasterizer (note how lines aren't in the correct position):
Without line hack:
Y Map workaround doesn't work

Let me know if any further info is needed.
Edit: Additionally, someone spotted that setting 3D renderer to None makes the Y Map work.
Just dropping by to say, it's for real.
the problem is the game stops rendering 3d, then changes the clear color (to transparent) i need to investigate whether changes to the clear color can take effect even if the scene isn't redrawn (and changes to other things, too)
reminder: it is sensible in principle to send the flush command, and then change the clear color--but only if it's immediately after. if the final command executes (upon vsync) and THEN you change the clear color, it'd be too late for the new color to ever get latched. i did see that happening in desmume, but it's possible we have a timing bug causing the vsync and clear color change to get wrongly ordered. I suspect it's that the clear color can be changed any time, though.
The rendering engine draws every frame even if no flush commands are sent. So changing the clear color in that case should still take effect.
Some things get latched on swapbuffers, some things don't. The question is, which things do? It's seemingly random which is which. Just because it keeps rendering doesn't mean it uses the current clear color register configuration, it could be using the previously latched one (and there's some other problem causing the timing of the swapbuffers and register setting to get wrongly ordered)