Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Molenkamp <github@lazydodo.com>2018-06-27 00:17:31 +0300
committerRay Molenkamp <github@lazydodo.com>2018-06-27 00:17:31 +0300
commit6f2c9ea3e13248d146816910369983c5265bc968 (patch)
tree32b779874f8116663534ab8a6602f8f139bd6360 /source/blender/gpu/intern/gpu_framebuffer.c
parenta61480c27103fbf449fd14ea8061b65c29f19eae (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.c10
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));
+}