Age | Commit message (Collapse) | Author |
|
Misuse of indexes.
`color_attachements` has only color ones while `config` has color and depth.
|
|
The pixel components were not being considered.
|
|
`GPUFrameBuffer.viewport_get` has no args.
|
|
|
|
Error was caused by using `#if` directive in `PyDoc_STRVAR` macro.
This partially reverts 1e4c35d910e18858c41924f9e27ef8e1070cbd0a
|
|
|
|
|
|
This fixes some errors of continuity and consistency of formatting on
https://docs.blender.org/api/current/gpu.html
This also details the description of some parameters.
Differential Revision: https://developer.blender.org/D10531
|
|
|
|
|
|
All tracked objects need a matching un-track,
also remove redundant Py_XDECREF call.
|
|
It can be useful to replace `image.bindcode` and `image.gl_load`.
Used for example in https://docs.blender.org/api/current/gpu.html#d-image
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D10458
|
|
|
|
Currently the GPU module for python has different ways to handle enums.
- Organizing items in `PyC_StringEnumItems` arrays and parsing them with `PyC_ParseStringEnum`.
- Using dedicated functions for each type of enum (`bpygpu_ParsePrimType`, `pygpu_ParseVertCompType` and `pygpu_ParseVertFetchMode`).
Although apparently more efficient (especially `pygpu_ParseVertCompType`
which transforms strings into integers for simple comparison), these
dedicated functions duplicate functionality, increase the complexity of
the code and consequently make it less readable.
Reviewed By: campbellbarton
Differential Revision: https://developer.blender.org/D10456
|
|
|
|
|
|
This matches nearly all other argument ordering in Blender,
including Python mathutils API.
|
|
|
|
From the the opengl wiki:
> Buffer objects are associated with a program's uniform block similarly to the way that texture objects are associated with sampler uniforms.
|
|
|
|
This commit extends the gpu python API with:
```
gpu.types.Buffer #"__init__", "to_list"
gpu.types.GPUTexture #"__init__", "clear", "read", "format"
gpu.types.GPUFrameBuffer #"__init__", "bind", "clear", "is_bound", "viewport", ("__enter__", "__exit__" with "GPUFrameBufferStackContext")
gpu.types.GPUUniformBuf #"__init__", "update"
gpu.state #"blend_set", "blend_get", "depth_test_set", "depth_test_get", "depth_mask_set", "depth_mask_get", "viewport_set", "viewport_get", "line_width_set", "line_width_get", "point_size_set", "color_mask_set", "face_culling_set", "front_facing_set", "program_point_size_set"
```
Add these methods to existing objects:
```
gpu.types.GPUShader #"uniform_sample", "uniform_buffer"
```
Maniphest Tasks: T80481
Differential Revision: https://developer.blender.org/D8826
|
|
`py_` prefix can be confused with the Python's own API's.
|
|
Replace deprecated _PyUnicode_AsString{AndSize} usage.
T83626 still needs to be resolved before 3.10 is usable.
|
|
|
|
It was not following the own documentation at the top code that mentions
that for local API the prefix is "bpygpu_".
|
|
|
|
Caused by rB5b34d11b55e0.
Above commit restored the view matrices in ED_view3d_draw_offscreen
_before_ they can be stored in the ImBuff (see ED_view3d_draw_offscreen
/ texture_paint_image_from_view_exec).
Now make restoring the view matrices optional and dont do this in case
of reprojection, so the used matrices can still be saved in the ImBuff
later.
Reviewed By: campbellbarton
Maniphest Tasks: T85395
Differential Revision: https://developer.blender.org/D10331
|
|
Use the more common abbreviation for `implementation`.
|
|
Removed the `--debug-gpu-shaders` argument in bc94036a76b6 but forgot to amend
these changes.
|
|
Off-screen drawing doesn't work once the 'bgl' workaround is enabled.
Disable this for off-screen drawing.
|
|
Add framebuffer viewport setter; Remove framebuffer restore; Expose framebuffer push/pop stack API; Remove blend modes; Remove depth_range_set; Implement GPU_face_culling, GPU_front_facing, GPU_point_size, GPU_line_width, GPU_viewport, GPU_color_mask and GPU_depth_mask"
This reverts commit 9db3d1951da15254efbbcf028176facb78118ec1.
This was an accidental commit of the patch D8826
|
|
framebuffer viewport setter; Remove framebuffer restore; Expose framebuffer push/pop stack API; Remove blend modes; Remove depth_range_set; Implement GPU_face_culling, GPU_front_facing, GPU_point_size, GPU_line_width, GPU_viewport, GPU_color_mask and GPU_depth_mask
|
|
Introduced in rBcada56b1f72f537f9ab007cfafd430ac10c292fb
|
|
|
|
|
|
Generating the thumbnail left the view matrices set to values
that couldn't be used for cursor drawing.
Backup/restore the matrices for off-screen drawing.
|
|
Some callers were passing in dummy values, this can be accessed from
`RegionView3D.is_persp` can be used to check this.
|
|
This would allow python script to access `lineWidth` uniform when drawing lines
without using `glLineWidth`.
Reviewed By: Jeroen Bakker
Differential Revision: https://developer.blender.org/D9518
|
|
This fixes a compile warning for sphinx.
This commit includes some reformating of the information.
|
|
|
|
Remove submodule listings from the module docstring,
as this information already exists in the generator.
|
|
The Python API document of gpu.select.load_id does not follow rst format.
c.f. https://docs.blender.org/api/current/gpu.select.html
This patch fixes it.
Reviewed By: Blendify
Differential Revision: https://developer.blender.org/D8547
|
|
This avoids wrong viewport and scissor bounds with BGL commands.
|
|
|
|
This is just a cleanup to isolate the internals of the vertbuf.
This adds some getters to avoid refactor of existing code.
|
|
Makes it follow the functions names.
|
|
No functional changes
|
|
Split the depsgraph allocation into a separate function
`BKE_scene_ensure_depsgraph()`. Parameters are only passed to those
functions that actually need them. This removes the the "if that boolean
is `false` this pointer is allowed to be `NULL`" logic and more cleanly
decouples code.
No functional changes.
|
|
|
|
|