14 Commits

Author SHA1 Message Date
Jeroen Bakker
a06c7fddbb Fix #139565: Update GPU polyline examples
Update GPU line examples to use polyline shaders.

Pull Request: https://projects.blender.org/blender/blender/pulls/139587
2025-05-30 09:10:51 +02:00
Jeroen Bakker
c56a855b9f Fix #139565: PyGPU: Add builtin point shaders
This PR adds builtin shaders for drawing points. Using `FLAT_COLOR`,
`SMOOTH_COLOR`, `UNIFORM_COLOR` can lead to undesired behavior
on Metal and Vulkan backends. To ensure future compatibility this PR
adds `POINT_FLAT_COLOR` and `POINT_UNIFORM_COLOR`.

The point size can be set using `gpu.state.point_size_set`.

Pull Request: https://projects.blender.org/blender/blender/pulls/139583
2025-05-29 14:36:32 +02:00
Campbell Barton
72f24fcbab Cleanup: resolve pylint warnings 2025-05-23 14:03:20 +10:00
Clément Foucault
f55e97a83a Documentation: Python: Add notice about MSL compatibility
See #139185
2025-05-22 11:47:06 +02:00
Campbell Barton
b00550916c PyDoc: correct use of single back-ticks 2024-11-03 21:50:33 +11:00
Campbell Barton
495e4f2d0e PyAPI: remove deprecated 2D_/3D_ prefix (update docs) 2023-05-23 16:24:08 +10:00
Campbell Barton
9a8fd2f1dd PyAPI: remove deprecated 2D_/3D_ prefix for built-in shader names
Names passed to gpu.shader.from_builtin()
no longer skip the 2D_/3D_ prefix.
2023-05-23 15:51:54 +10:00
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
Aaron Carlisle
2e52b3206c PyDoc: Fix warnings from out of bounds include statement 2020-06-02 18:21:42 -04:00
Campbell Barton
3c8c976086 Cleanup: gpu docs 2018-11-20 07:38:20 +11:00
Jacques Lucke
ded780f13e Py API Docs: fix typos/wording
found by Omar Ahmad
2018-11-12 13:48:31 +01:00
Jacques Lucke
492dbae4d1 Py API Docs: Restructure gpu module introduction 2018-11-12 12:14:18 +01:00
Jacques Lucke
a4bfccc439 Py API Docs: More gpu module documentation 2018-11-09 19:20:55 +01:00
Jacques Lucke
a8e9959e07 API Docs: gpu api introduction + examples 2018-11-05 19:28:28 +01:00