GPUContext: Move GPUContext to gpu::Context for more consistency

This makes the GPUContext follow the same naming convention as the rest
of the module.

Also add a static getter for extra bonus style (no need for casts):
- Context::get()
- GLContext::get()
This commit is contained in:
2020-09-08 04:12:12 +02:00
parent d2e9de93b8
commit 48690d967a
25 changed files with 152 additions and 127 deletions

View File

@@ -52,7 +52,7 @@ void GLVertBuf::release_data(void)
void GLVertBuf::duplicate_data(VertBuf *dst_)
{
BLI_assert(GPU_context_active_get() != NULL);
BLI_assert(GLContext::get() != NULL);
GLVertBuf *src = this;
GLVertBuf *dst = static_cast<GLVertBuf *>(dst_);
@@ -82,7 +82,7 @@ void GLVertBuf::upload_data(void)
void GLVertBuf::bind(void)
{
BLI_assert(GPU_context_active_get() != NULL);
BLI_assert(GLContext::get() != NULL);
if (vbo_id_ == 0) {
glGenBuffers(1, &vbo_id_);