$darkmode
Suckless OGL 1.0.0
A lean, high-performance C11 PBR Renderer
postprocess_readback.h
Go to the documentation of this file.
1 
9 #ifndef POSTPROCESS_READBACK_H
10 #define POSTPROCESS_READBACK_H
11 
12 #include <glad/glad.h>
13 
14 #include <cglm/types.h>
15 #include <stdint.h>
16 
17 typedef struct PostProcess PostProcess;
18 
24 void postprocess_update_time(PostProcess* post_processing, float delta_time);
25 
26 GLuint postprocess_get_exposure_pbo(PostProcess* post_processing, int index);
27 GLuint postprocess_get_histogram_pbo(PostProcess* post_processing, int index);
28 GLsync postprocess_get_exposure_sync(PostProcess* post_processing, int index);
29 GLsync postprocess_get_histogram_sync(PostProcess* post_processing, int index);
30 void postprocess_set_exposure_sync(PostProcess* post_processing, int index,
31  GLsync sync);
32 void postprocess_set_histogram_sync(PostProcess* post_processing, int index,
33  GLsync sync);
34 
39 void postprocess_update_readbacks(PostProcess* post_processing,
40  uint64_t frame_count);
41 
45 void postprocess_set_exposure_target(PostProcess* post_processing,
46  float threshold);
47 
54 void postprocess_update_matrices(PostProcess* post_processing, mat4 view_proj);
55 
61  uint64_t frame_count, int* buckets,
62  int size, float* min_lum,
63  float* max_lum);
64 
65 #endif /* POSTPROCESS_READBACK_H */
GLuint postprocess_get_histogram_pbo(PostProcess *post_processing, int index)
Definition: postprocess_readback.c:18
void postprocess_update_readbacks(PostProcess *post_processing, uint64_t frame_count)
Updates all async GPU readbacks (Exposure, Histogram). Handles PBO mapping and Sync management intern...
Definition: postprocess_readback.c:48
int postprocess_compute_luminance_histogram(PostProcess *post_processing, uint64_t frame_count, int *buckets, int size, float *min_lum, float *max_lum)
Computes the luminance histogram from the GPU readback.
Definition: postprocess_readback.c:129
GLsync postprocess_get_histogram_sync(PostProcess *post_processing, int index)
Definition: postprocess_readback.c:28
void postprocess_set_exposure_sync(PostProcess *post_processing, int index, GLsync sync)
Definition: postprocess_readback.c:33
void postprocess_update_matrices(PostProcess *post_processing, mat4 view_proj)
Updates view-projection matrices for effects requiring depth-reconstruction.
Definition: postprocess_readback.c:214
GLuint postprocess_get_exposure_pbo(PostProcess *post_processing, int index)
Definition: postprocess_readback.c:13
void postprocess_set_histogram_sync(PostProcess *post_processing, int index, GLsync sync)
Definition: postprocess_readback.c:39
GLsync postprocess_get_exposure_sync(PostProcess *post_processing, int index)
Definition: postprocess_readback.c:23
void postprocess_update_time(PostProcess *post_processing, float delta_time)
Increments internal clocks.
Definition: postprocess_readback.c:6
void postprocess_set_exposure_target(PostProcess *post_processing, float threshold)
Updates the target exposure threshold for AE.
Definition: postprocess_readback.c:81
Main pipeline state for post-processing.
Definition: postprocess_internal.h:46
float delta_time
Definition: postprocess_internal.h:84