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:
@@ -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_);
|
||||
|
Reference in New Issue
Block a user