[Added] RenderUnderlay

Moderator: GZDoom Developers

RenderUnderlay

Postby Major Cooke » Sat Jun 22, 2019 8:07 pm

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
Major Cooke
The road to Hell is paved in the carrion she leaves behind.
 
Joined: 28 Jan 2007

Re: RenderUnderlay

Postby Nash » Sun Jun 23, 2019 12:26 am

Ah good, I needed this too. Would prevent me from having to do stupid workarounds just to draw stuff behind the HUD.
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes
Operating System: Windows 10/8.1/8 64-bit
Graphics Processor: nVidia with Vulkan support

Re: RenderUnderlay

Postby Graf Zahl » Sun Jun 23, 2019 1:13 am

I think you may want to change the order in DrawBottomStuff.
User avatar
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: RenderUnderlay

Postby Major Cooke » Sun Jun 23, 2019 6:35 am

...Ah! Thanks. Fixed
User avatar
Major Cooke
The road to Hell is paved in the carrion she leaves behind.
 
Joined: 28 Jan 2007

Re: RenderUnderlay

Postby Marisa Kirisame » Sun Jun 23, 2019 7:47 am

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
Marisa Kirisame
ZScript Magician
 
 
 
Joined: 08 Feb 2008
Location: Vigo, Galicia
Discord: Marisa Kirisame#4689
Twitch ID: magusmarisa
Github ID: OrdinaryMagician
Operating System: Other Linux 64-bit
Graphics Processor: nVidia with Vulkan support

Re: RenderUnderlay

Postby Major Cooke » Sun Jun 23, 2019 3:59 pm

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.
User avatar
Major Cooke
The road to Hell is paved in the carrion she leaves behind.
 
Joined: 28 Jan 2007

Re: RenderUnderlay

Postby Blue Shadow » Wed Jul 03, 2019 8:01 pm

User avatar
Blue Shadow
 
 
 
Joined: 14 Nov 2010
Operating System: Windows 10/8.1/8 64-bit
Graphics Processor: ATI/AMD (Modern GZDoom)


Return to Closed Feature Suggestions

Who is online

Users browsing this forum: No registered users and 1 guest