GPU: add offscreen buffer drawing utility functions.

This commit is contained in:
2018-02-13 18:18:04 +01:00
parent e9b1163162
commit 6e040b045a
9 changed files with 64 additions and 25 deletions

View File

@@ -83,14 +83,16 @@ void GPU_framebuffer_recursive_downsample(
* - wrapper around framebuffer and texture for simple offscreen drawing
* - changes size if graphics card can't support it */
GPUOffScreen *GPU_offscreen_create(int width, int height, int samples, bool high_bitdepth, char err_out[256]);
GPUOffScreen *GPU_offscreen_create(int width, int height, int samples,
bool depth, bool high_bitdepth, char err_out[256]);
void GPU_offscreen_free(GPUOffScreen *ofs);
void GPU_offscreen_bind(GPUOffScreen *ofs, bool save);
void GPU_offscreen_unbind(GPUOffScreen *ofs, bool restore);
void GPU_offscreen_read_pixels(GPUOffScreen *ofs, int type, void *pixels);
void GPU_offscreen_blit(GPUOffScreen *ofs, int x, int y);
int GPU_offscreen_width(const GPUOffScreen *ofs);
int GPU_offscreen_height(const GPUOffScreen *ofs);
int GPU_offscreen_color_texture(const GPUOffScreen *ofs);
struct GPUTexture *GPU_offscreen_color_texture(const GPUOffScreen *ofs);
void GPU_offscreen_viewport_data_get(
GPUOffScreen *ofs,