Commit Graph

7 Commits

Author SHA1 Message Date
Germano Cavalcante 2ce8b01c59 PyGPU: call 'GPU_shader_bind' in 'GPUShader.uniform_' methods
This simplifies python code.

When we call a method like shader.uniform_float("color", (1,1,1,1)),
we expect the shader's uniform to be updated regardless of whether the
shader is bound or not.

And `batch.draw()` already calls `GPU_shader_bind` inside.

Differential Revision: https://developer.blender.org/D15929
2022-09-19 09:40:20 -03:00
Germano Cavalcante cb771dbe76 PyDoc: update the shader creation examples with gpu module
The old way of creating shaders is being replaced by using
`GPUShaderCreateInfo` for more portability.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D14634
2022-09-01 08:31:56 -03:00
Aaron Carlisle 4fa4245464 PyDocs: GPU Module: Examples: convert all gl_FragColor variables to FragColor
Based on D6425 by @robbott

Differential Revision: https://developer.blender.org/D6425
2020-10-14 11:18:36 -04:00
Aaron Carlisle 2e52b3206c PyDoc: Fix warnings from out of bounds include statement 2020-06-02 18:21:42 -04:00
Dalai Felinto c01e43d024 Update Python GPU example to latest depsgraph API 2019-05-31 11:31:04 -03:00
Campbell Barton 3c8c976086 Cleanup: gpu docs 2018-11-20 07:38:20 +11:00
Jacques Lucke 3aa30406dd Py API Docs: New Example for off screen rendering 2018-11-13 16:38:12 +01:00