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
This commit is contained in:
2018-06-26 15:17:31 -06:00
parent a61480c271
commit 6f2c9ea3e1
7 changed files with 228 additions and 57 deletions

View File

@@ -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));
}