RenderUnderlay

Moderator: GZDoom Developers

Post Reply
User avatar
Major Cooke
Posts: 8175
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

RenderUnderlay

Post by Major Cooke »

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.
User avatar
Nash
 
 
Posts: 17439
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: RenderUnderlay

Post by Nash »

Ah good, I needed this too. Would prevent me from having to do stupid workarounds just to draw stuff behind the HUD.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: RenderUnderlay

Post by Graf Zahl »

I think you may want to change the order in DrawBottomStuff.
User avatar
Major Cooke
Posts: 8175
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: RenderUnderlay

Post by Major Cooke »

...Ah! Thanks. Fixed
User avatar
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

Post by Marisa the Magician »

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.
User avatar
Major Cooke
Posts: 8175
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: RenderUnderlay

Post by Major Cooke »

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.
Blue Shadow
Posts: 4949
Joined: Sun Nov 14, 2010 12:59 am

Re: RenderUnderlay

Post by Blue Shadow »

Post Reply

Return to “Closed Feature Suggestions [GZDoom]”