Run the attached mod on a fresh GZDoom ini on Doom 2. The statusbar should display normally, but starting from this Raze back-end update, the numbers on it seem to become a garbage texture, with random colours. I would provide a more minimal example (I minified it what I could), but I literally cannot make one cleanly (filter\game-doomchex\zscript\statusbars is where the relevent main drawing happens). This bug is sometimes "fixed" by commenting out random lines of code that run in the mod, even if they don't have anything to do with the garbage texture being drawn, so something is definitely going wrong. Below is a picture.
[imgur]https://i.imgur.com/lXNteJb[/imgur]
[g9925cc380] Raze Backend update breaks drawing
Moderator: GZDoom Developers
Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
[g9925cc380] Raze Backend update breaks drawing
- Attachments
-
- fullscrn_huds_min.pk3
- (171.16 KiB) Downloaded 16 times
- drfrag
- Vintage GZDoom Developer
- Posts: 3141
- Joined: Fri Apr 23, 2004 3:51 am
- Location: Spain
- Contact:
Re: [g9925cc380] Raze Backend update breaks drawing
It actually happens with the default status bar the first time you start a game until the wipe ends. And even once it stayed until i changed the resolution in windowed mode but now i can't reproduce that.
- Lord Misfit
- Posts: 221
- Joined: Wed Dec 27, 2006 8:13 pm
- Preferred Pronouns: He/Him
- Graphics Processor: nVidia with Vulkan support
- Location: Canton, OH
- Contact:
Re: [g9925cc380] Raze Backend update breaks drawing
I hate to pile onto this with a not-quite-identical report, but I also have an issue related to the Raze backend update, though mine is less of things disappearing, and more of font translations being borked on the inventory-bar's DrawString command specifically.
The top part of the image shows that the numbers and "/" in each of the status bar items are different colors, and the idea is that depending on how many of an item [% of maximum, or having 0 or all of that item's maximum] that the first number on top of each item is a different color (dark-red, orange, yellow, green, blue from 0% to full of the item).
Also note that on the right side [the other part that's not darkened], the fullscreen display is being used to show the item selected and it's current / max amounts, they also have a similar coloring system, where the top number's color is based on having 0, a % of, or the max of that item.
This is taken with 4.6pre16.
The bottom half of the image is from 4.6pre-20, after the Raze backend update. First note that the fullscreen display of the current item is still working as it should, with the top color still blue [indicating that you have the max of that item currently], however the status bar fonts are now ALL showing green instead of being translated, numbers and "/" character alike. Checking the font images I'm using for this, the "green" color is the "default" color for the font characters in my files, and all of the images for the font are 16million color PNGs, however the images for the font on the right side which uses the fullscreen rendering, those images are ALSO 16m color PNG files, and they still translate colors the way they did in 4.6pre-16.
Now, I tried messing with the palettes of the font images that the statusbar uses themselves, but that didn't seem to change their outputs in game. I also noticed when I load a game, for like one tic, the old colors on the Statusbar show, but then go untranslated (this turning green in the display).
I have reason to believe the change is connected to lines 189, 191, 215 and 217 of "src/common/2d/v_drawtext.cpp", where there are changes like and
I have no idea how or what I can do to change my font-character images [if need be] for the new code to allow translations on them again, or if this is an oversight bug on the engine's behalf. x.x
If you really want the statusbar code I use, I'll see what I can do, but isolating some stuff from the mod might be tricky because I have to figure out all the images to keep and how to make the statusbar code work independent of the mod itself, hence why I haven't yet put a download for anything.
The top part of the image shows that the numbers and "/" in each of the status bar items are different colors, and the idea is that depending on how many of an item [% of maximum, or having 0 or all of that item's maximum] that the first number on top of each item is a different color (dark-red, orange, yellow, green, blue from 0% to full of the item).
Also note that on the right side [the other part that's not darkened], the fullscreen display is being used to show the item selected and it's current / max amounts, they also have a similar coloring system, where the top number's color is based on having 0, a % of, or the max of that item.
This is taken with 4.6pre16.
The bottom half of the image is from 4.6pre-20, after the Raze backend update. First note that the fullscreen display of the current item is still working as it should, with the top color still blue [indicating that you have the max of that item currently], however the status bar fonts are now ALL showing green instead of being translated, numbers and "/" character alike. Checking the font images I'm using for this, the "green" color is the "default" color for the font characters in my files, and all of the images for the font are 16million color PNGs, however the images for the font on the right side which uses the fullscreen rendering, those images are ALSO 16m color PNG files, and they still translate colors the way they did in 4.6pre-16.
Now, I tried messing with the palettes of the font images that the statusbar uses themselves, but that didn't seem to change their outputs in game. I also noticed when I load a game, for like one tic, the old colors on the Statusbar show, but then go untranslated (this turning green in the display).
I have reason to believe the change is connected to lines 189, 191, 215 and 217 of "src/common/2d/v_drawtext.cpp", where there are changes like
Code: Select all
bool palettetrans = (normalcolor == CR_UNDEFINED && parms.TranslationId != 0);
Code: Select all
if (!palettetrans) parms.TranslationId = redirected ? -1 : font->GetColorTranslation((EColorRange)normalcolor, &color);
If you really want the statusbar code I use, I'll see what I can do, but isolating some stuff from the mod might be tricky because I have to figure out all the images to keep and how to make the statusbar code work independent of the mod itself, hence why I haven't yet put a download for anything.
Re: [g9925cc380] Raze Backend update breaks drawing
Add another affected mod to the list. Each time I launch the game the font looks funky in a different way, but funky nonetheless. Strangely enough this is only the case with the HUD. The color options use the same font as the HUD and those look fine.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: [g9925cc380] Raze Backend update breaks drawing
Looks like there's some uninitialized alpha being used.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: [g9925cc380] Raze Backend update breaks drawing
Fixed. There was a parameter missing in DrawString's declaration, switching off the JIT in the debugger immediately prompted an error.