GPUFramebuffer: Add recursive downsampling function.

This special case function enables rendering to a miplevel while using the miplevels above as texture input.
This is needed for some algorithm (i.e. creating a min-max depth pyramid texture).
This commit is contained in:
2017-06-22 02:01:58 +02:00
parent fe2ff3fc89
commit ed59d03bfc
4 changed files with 70 additions and 18 deletions

View File

@@ -75,6 +75,10 @@ void GPU_framebuffer_blit(
GPUFrameBuffer *fb_read, int read_slot,
GPUFrameBuffer *fb_write, int write_slot, bool use_depth);
void GPU_framebuffer_recursive_downsample(
GPUFrameBuffer *fb, struct GPUTexture *tex, int num_iter,
void (*callback)(void *userData, int level), void *userData);
/* GPU OffScreen
* - wrapper around framebuffer and texture for simple offscreen drawing
* - changes size if graphics card can't support it */