Pull Request
Basically a direct copy/paste of RenderOverlay's code, but made to be drawn first so it goes under huds instead. Before this PR, there was no way to draw stuff behind the huds due to RenderOverlay being drawn last.
I also chose to make it a separate function rather than a boolean to RenderOverlay because that would mean constantly calling RenderOverlay twice if there's any code at all in it.
With this I'll be able to draw elements that render through walls, yet won't overlap the hud itself such as making Doom 2016-esque highlights of item drops.
RenderUnderlay
Moderator: GZDoom Developers
- Major Cooke
- Posts: 8176
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Location: QZDoom Maintenance Team
Re: RenderUnderlay
Ah good, I needed this too. Would prevent me from having to do stupid workarounds just to draw stuff behind the HUD.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49071
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: RenderUnderlay
I think you may want to change the order in DrawBottomStuff.
- Major Cooke
- Posts: 8176
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Location: QZDoom Maintenance Team
Re: RenderUnderlay
...Ah! Thanks. Fixed
- Marisa the Magician
- Posts: 3886
- Joined: Fri Feb 08, 2008 9:15 am
- Preferred Pronouns: She/Her
- Operating System Version (Optional): (btw I use) Arch
- Graphics Processor: nVidia with Vulkan support
- Location: Vigo, Galicia
- Contact:
Re: RenderUnderlay
Although this is possible already with zscript hudmessages, it's a good idea to have something else that doesn't require a complex setup like them.
- Major Cooke
- Posts: 8176
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Location: QZDoom Maintenance Team
Re: RenderUnderlay
I couldn't agree more. Stuff like KeksDose's screen projection library actually requires the RenderEvent things, which would just make this an enormous hassle if I tried making it as a HudMessageBase inheriting class.
Yes, I could technically use RenderOverlay's RenderEvent and transfer it over to the HUDMessage but as Marisa said, it can be quite complex.
Yes, I could technically use RenderOverlay's RenderEvent and transfer it over to the HUDMessage but as Marisa said, it can be quite complex.
-
- Posts: 4949
- Joined: Sun Nov 14, 2010 12:59 am