GPU: Remove wrapper type for gpu::Shader
This is the first step into merging DRW_gpu_wrapper.hh into the GPU module. This is very similar to #119825. Pull Request: https://projects.blender.org/blender/blender/pulls/144229
This commit is contained in:
@@ -201,7 +201,7 @@ static PyObject *pygpu_batch_program_set(BPyGPUBatch *self, BPyGPUShader *py_sha
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
GPUShader *shader = py_shader->shader;
|
||||
blender::gpu::Shader *shader = py_shader->shader;
|
||||
GPU_batch_set_shader(self->batch, shader);
|
||||
|
||||
#ifdef USE_GPU_PY_REFERENCES
|
||||
@@ -324,7 +324,7 @@ static PyObject *pygpu_batch_draw(BPyGPUBatch *self, PyObject *args)
|
||||
if (py_shader && py_shader->is_builtin &&
|
||||
ELEM(self->batch->prim_type, GPU_PRIM_LINES, GPU_PRIM_LINE_STRIP, GPU_PRIM_LINE_LOOP))
|
||||
{
|
||||
GPUShader *shader = py_shader->shader;
|
||||
blender::gpu::Shader *shader = py_shader->shader;
|
||||
const float line_width = GPU_line_width_get();
|
||||
const bool use_linesmooth = GPU_line_smooth_get();
|
||||
if (line_width > 1.0f || use_linesmooth) {
|
||||
@@ -355,7 +355,7 @@ static PyObject *pygpu_batch_draw(BPyGPUBatch *self, PyObject *args)
|
||||
/* Emit a warning when trying to draw points with a regular shader as it is too late to
|
||||
* automatically switch to a point shader. */
|
||||
if (py_shader && py_shader->is_builtin && self->batch->prim_type == GPU_PRIM_POINTS) {
|
||||
GPUShader *shader = py_shader->shader;
|
||||
blender::gpu::Shader *shader = py_shader->shader;
|
||||
if (shader == GPU_shader_get_builtin_shader(GPU_SHADER_3D_FLAT_COLOR)) {
|
||||
PyErr_WarnEx(PyExc_DeprecationWarning,
|
||||
"Calling GPUBatch.draw to draw points with "
|
||||
|
||||
Reference in New Issue
Block a user