Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/python/gpu/gpu_py_batch.c')
-rw-r--r--source/blender/python/gpu/gpu_py_batch.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/python/gpu/gpu_py_batch.c b/source/blender/python/gpu/gpu_py_batch.c
index 01bccc57c7a..bb7028c11ab 100644
--- a/source/blender/python/gpu/gpu_py_batch.c
+++ b/source/blender/python/gpu/gpu_py_batch.c
@@ -50,7 +50,7 @@
static bool bpygpu_batch_is_program_or_error(BPyGPUBatch *self)
{
- if (!glIsProgram(self->batch->program)) {
+ if (!self->batch->shader) {
PyErr_SetString(PyExc_RuntimeError, "batch does not have any program assigned to it");
return false;
}
@@ -227,7 +227,7 @@ static PyObject *bpygpu_Batch_draw(BPyGPUBatch *self, PyObject *args)
return NULL;
}
}
- else if (self->batch->program != GPU_shader_get_program(py_program->shader)) {
+ else if (self->batch->shader != py_program->shader) {
GPU_batch_set_shader(self->batch, py_program->shader);
}
@@ -240,7 +240,7 @@ static PyObject *bpygpu_Batch_program_use_begin(BPyGPUBatch *self)
if (!bpygpu_batch_is_program_or_error(self)) {
return NULL;
}
- GPU_batch_program_use_begin(self->batch);
+ GPU_shader_bind(self->batch->shader);
Py_RETURN_NONE;
}
@@ -249,7 +249,7 @@ static PyObject *bpygpu_Batch_program_use_end(BPyGPUBatch *self)
if (!bpygpu_batch_is_program_or_error(self)) {
return NULL;
}
- GPU_batch_program_use_end(self->batch);
+ GPU_shader_unbind();
Py_RETURN_NONE;
}