Suckless OGL 1.0.0
A lean, high-performance C11 PBR Renderer
Loading...
Searching...
No Matches
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
17typedef struct PostProcess PostProcess;
18
24void postprocess_update_time(PostProcess* post_processing, float delta_time);
25
26GLuint postprocess_get_exposure_pbo(PostProcess* post_processing, int index);
27GLuint postprocess_get_histogram_pbo(PostProcess* post_processing, int index);
28GLsync postprocess_get_exposure_sync(PostProcess* post_processing, int index);
29GLsync postprocess_get_histogram_sync(PostProcess* post_processing, int index);
30void postprocess_set_exposure_sync(PostProcess* post_processing, int index,
31 GLsync sync);
32void postprocess_set_histogram_sync(PostProcess* post_processing, int index,
33 GLsync sync);
34
39void postprocess_update_readbacks(PostProcess* post_processing,
40 uint64_t frame_count);
41
46 float threshold);
47
54void 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:23
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:53
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:134
GLsync postprocess_get_histogram_sync(PostProcess *post_processing, int index)
Definition postprocess_readback.c:33
void postprocess_set_exposure_sync(PostProcess *post_processing, int index, GLsync sync)
Definition postprocess_readback.c:38
void postprocess_update_matrices(PostProcess *post_processing, mat4 view_proj)
Updates view-projection matrices for effects requiring depth-reconstruction.
Definition postprocess_readback.c:219
GLuint postprocess_get_exposure_pbo(PostProcess *post_processing, int index)
Definition postprocess_readback.c:18
void postprocess_set_histogram_sync(PostProcess *post_processing, int index, GLsync sync)
Definition postprocess_readback.c:44
GLsync postprocess_get_exposure_sync(PostProcess *post_processing, int index)
Definition postprocess_readback.c:28
void postprocess_update_time(PostProcess *post_processing, float delta_time)
Increments internal clocks.
Definition postprocess_readback.c:11
void postprocess_set_exposure_target(PostProcess *post_processing, float threshold)
Updates the target exposure threshold for AE.
Definition postprocess_readback.c:86
Main pipeline state for post-processing.
Definition postprocess_internal.h:46
float delta_time
Definition postprocess_internal.h:84