RenderUnderlay

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: RenderUnderlay

Re: RenderUnderlay

by Blue Shadow » Wed Jul 03, 2019 7:01 pm

Re: RenderUnderlay

by Major Cooke » Sun Jun 23, 2019 2: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.

Re: RenderUnderlay

by Marisa the Magician » Sun Jun 23, 2019 6: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.

Re: RenderUnderlay

by Major Cooke » Sun Jun 23, 2019 5:35 am

...Ah! Thanks. Fixed

Re: RenderUnderlay

by Graf Zahl » Sun Jun 23, 2019 12:13 am

I think you may want to change the order in DrawBottomStuff.

Re: RenderUnderlay

by Nash » Sat Jun 22, 2019 11:26 pm

Ah good, I needed this too. Would prevent me from having to do stupid workarounds just to draw stuff behind the HUD.

RenderUnderlay

by Major Cooke » Sat Jun 22, 2019 7: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.

Top