[Bf-blender-cvs] [3aed08377d0] blender2.8: GPY Python: program_use_begin and program_use_end.

mano-wii noreply at git.blender.org
Mon Oct 1 20:09:02 CEST 2018


Commit: 3aed08377d00f39ae6defa7309bf3ea2bb5976f9
Author: mano-wii
Date:   Mon Oct 1 13:21:08 2018 -0300
Branches: blender2.8
https://developer.blender.org/rB3aed08377d00f39ae6defa7309bf3ea2bb5976f9

GPY Python: program_use_begin and program_use_end.

The user has to be encouraged to use the `program_set` or `program_set_builtin` before drawing.
This avoids problem with gl_context.

===================================================================

M	source/blender/python/gpu/gpu_py_batch.c

===================================================================

diff --git a/source/blender/python/gpu/gpu_py_batch.c b/source/blender/python/gpu/gpu_py_batch.c
index df7d305300c..b746a9f6d36 100644
--- a/source/blender/python/gpu/gpu_py_batch.c
+++ b/source/blender/python/gpu/gpu_py_batch.c
@@ -323,9 +323,9 @@ static struct PyMethodDef bpygpu_VertBatch_methods[] = {
 	  METH_VARARGS, NULL},
 	{"draw", (PyCFunction) bpygpu_VertBatch_draw,
 	 METH_NOARGS, bpygpu_VertBatch_draw_doc},
-	{"program_use_begin", (PyCFunction)bpygpu_VertBatch_program_use_begin,
+	{"__program_use_begin", (PyCFunction)bpygpu_VertBatch_program_use_begin,
 	 METH_NOARGS, ""},
-	{"program_use_end", (PyCFunction)bpygpu_VertBatch_program_use_end,
+	{"__program_use_end", (PyCFunction)bpygpu_VertBatch_program_use_end,
 	 METH_NOARGS, ""},
 	{NULL, NULL, 0, NULL}
 };



More information about the Bf-blender-cvs mailing list