Page 1 of 1

Rendering flashes on the screen

PostPosted: 15 Sep 2017, 02:03
by jobenmoe
Hello,
I'm trying to index the replay of the race recordings based on flashes. I want to programatically render a flash every other frames of the race. Can someone guide me on how I could do that? I'm already familiar with the GL32_draw2DRectangle function for drawing image but I need to know How I can draw flashes every other frame. I'm not too familiar with the structure of the code so it would help alot if someone could help with this.

Best,
Jason

Re: Rendering flashes on the screen

PostPosted: 15 Sep 2017, 02:11
by Auria
Hi,

I guess it depend whether you envision the flash as being a light in the 3D world, or a GUI overlay.

For an in-engine flash done with lighting I'm probably not the best person to ask. This would likely involve changs to shaders

If you envision it as an overlay, take a look at states_screens/race_gui.cpp, that's where all the stuff is drawn.

Re: Rendering flashes on the screen

PostPosted: 15 Sep 2017, 02:15
by Auria
Oh I forgot... we already have a similar effect used to render lightning, take a look at graphics/post_processing.cpp, "renderLightning"

Re: Rendering flashes on the screen

PostPosted: 15 Sep 2017, 20:53
by jobenmoe
Auria,
Thank you for the reply. I was able to find another solution.