Fix framebuffer effects (#214) (#255)

Flush framebuffer/depthbuffer after rendering the 3d scene. This allows
screen effects such as smoke, sparks or electro-bastard ray to display
correctly.

Signed-off-by: Artur Rojek <contact@artur-rojek.eu>
This commit is contained in:
Artur Rojek 2022-12-11 23:30:56 +01:00 committed by GitHub
parent 676d26d3f9
commit addaa7294b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -12,6 +12,7 @@
#include "globvars.h"
#include "globvrpb.h"
#include "grafdata.h"
#include "harness/hooks.h"
#include "harness/os.h"
#include "harness/trace.h"
#include "init.h"
@ -1615,6 +1616,7 @@ void RenderAFrame(int pDepth_mask_on) {
ProcessTrack(gUniverse_actor, &gProgram_state.track_spec, gCamera, &gCamera_to_world, 1);
}
RenderSplashes();
Harness_Hook_FlushRenderer(); /* Dethrace. Flush buffers into memory. */
RenderSmoke(gRender_screen, gDepth_buffer, gCamera, &gCamera_to_world, gFrame_period);
RenderSparks(gRender_screen, gDepth_buffer, gCamera, &gCamera_to_world, gFrame_period);
RenderProximityRays(gRender_screen, gDepth_buffer, gCamera, &gCamera_to_world, gFrame_period);