diff options
author | Ray Molenkamp <github@lazydodo.com> | 2018-06-27 00:17:31 +0300 |
---|---|---|
committer | Ray Molenkamp <github@lazydodo.com> | 2018-06-27 00:17:31 +0300 |
commit | 6f2c9ea3e13248d146816910369983c5265bc968 (patch) | |
tree | 32b779874f8116663534ab8a6602f8f139bd6360 /source/blender/gpu/intern/gpu_framebuffer.c | |
parent | a61480c27103fbf449fd14ea8061b65c29f19eae (diff) |
bf_gpu: Add GPU_state module.
This has wrappers for the most common gl* functions in the codebase, and is in preparation for D3502
Reviewers: brecht, fclem
Differential Revision: https://developer.blender.org/D3501
Diffstat (limited to 'source/blender/gpu/intern/gpu_framebuffer.c')
-rw-r--r-- | source/blender/gpu/intern/gpu_framebuffer.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_framebuffer.c b/source/blender/gpu/intern/gpu_framebuffer.c index 18f8c33c3ca..eabd501f1d5 100644 --- a/source/blender/gpu/intern/gpu_framebuffer.c +++ b/source/blender/gpu/intern/gpu_framebuffer.c @@ -834,3 +834,13 @@ void GPU_offscreen_viewport_data_get( *r_color = ofs->color; *r_depth = ofs->depth; } + +void GPU_clear_color(float red, float green, float blue, float alpha) +{ + glClearColor(red, green, blue, alpha); +} + +void GPU_clear(GPUFrameBufferBits flags) +{ + glClear(convert_buffer_bits_to_gl(flags)); +} |