gpu.batch module: keep shader reference in batch.

This commit is contained in:
Germano Cavalcante 2018-09-20 16:38:43 -03:00
parent 9fb9604c19
commit f0149bc070
1 changed files with 5 additions and 0 deletions

View File

@ -170,6 +170,11 @@ static PyObject *bpygpu_VertBatch_program_set(BPyGPUBatch *self, BPyGPUShader *p
GPU_shader_get_program(shader),
GPU_shader_get_interface(shader));
#ifdef USE_GPU_PY_REFERENCES
/* Hold user */
PyList_Append(self->references, (PyObject *)py_shader);
#endif
Py_RETURN_NONE;
}