Blender Git Commit Log

Git Commits -> Revision ffa15f4

Revision ffa15f4 by Germano Cavalcante (master)
October 4, 2018, 02:34 (GMT)
Python GPU: GPUBatch and GPUShader refactor.

The changes are:
- The shader now is passed as a parameter of the batch `draw` method (batch.draw(shader)). Since the batch always has to set a shader before drawing;
- The batch methods to specify a value to a uniform have been removed. Uniforms are parameters of the program (here called shader). If you change a uniform, it changes in all batchs that use the same program;
- New methods were added to set uniforms by the shader;
- The `batch.program_set_builtin` was removed. It is a duplicate of `program_set` but without a shader object. We need the shader object to configure the uniform;

Differential Revision: https://developer.blender.org/D3752

Commit Details:

Full Hash: ffa15f4b4ad6c0ff70dfc2801bc32989ad97d257
Parent Commit: 98a10fd
Lines Changed: +207, -149

2 Modified Paths:

/source/blender/python/gpu/gpu_py_batch.c (+17, -117) (Diff)
/source/blender/python/gpu/gpu_py_shader.c (+190, -32) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021