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:
@@ -44,7 +44,7 @@ GLShader::GLShader(const char *name) : Shader(name)
|
||||
{
|
||||
#if 0 /* Would be nice to have, but for now the Deferred compilation \
|
||||
* does not have a GPUContext. */
|
||||
BLI_assert(GPU_context_active_get() != NULL);
|
||||
BLI_assert(GLContext::get() != NULL);
|
||||
#endif
|
||||
shader_program_ = glCreateProgram();
|
||||
|
||||
@@ -61,7 +61,7 @@ GLShader::~GLShader(void)
|
||||
{
|
||||
#if 0 /* Would be nice to have, but for now the Deferred compilation \
|
||||
* does not have a GPUContext. */
|
||||
BLI_assert(GPU_context_active_get() != NULL);
|
||||
BLI_assert(GLContext::get() != NULL);
|
||||
#endif
|
||||
/* Invalid handles are silently ignored. */
|
||||
glDeleteShader(vert_shader_);
|
||||
|
||||
Reference in New Issue
Block a user