Age | Commit message (Collapse) | Author |
|
While doxygen supports both, conform to our style guide.
Note that single back-tick's are already used in a majority of comments.
|
|
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.
|
|
|
|
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
|
|
`py_` prefix can be confused with the Python's own API's.
|
|
|
|
|
|
This is just a cleanup to isolate the internals of the vertbuf.
This adds some getters to avoid refactor of existing code.
|
|
This remove the use of batch->program and replace it with batch->shader.
This will allow GL abstraction latter.
|
|
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/python` module.
No functional changes.
|
|
|
|
|
|
T68035 by @luzpaz
|
|
|
|
Apply clang format as proposed in T53211.
For details on usage and instructions for migrating branches
without conflicts, see:
https://wiki.blender.org/wiki/Tools/ClangFormat
|
|
While \file doesn't need an argument, it can't have another doxy
command after it.
|
|
|
|
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
|
|
Needed for clan-format not to wrap onto one line.
|
|
BF-admins agree to remove header information that isn't useful,
to reduce noise.
- BEGIN/END license blocks
Developers should add non license comments as separate comment blocks.
No need for separator text.
- Contributors
This is often invalid, outdated or misleading
especially when splitting files.
It's more useful to git-blame to find out who has developed the code.
See P901 for script to perform these edits.
|
|
|
|
Move gpu initialization checks to the start of each function instead
of mixing with argument parsing.
|
|
Mixing file rename with other changes should be avoided.
Using 'module_py_api' convention here
is in keeping with imbuf, idprop, blf & bmesh.
No reason for gpu to have a different convention.
|
|
Instead of crashing, an error message is displayed if a function of the gpu module is called without a GPU context.
Reviewers: brecht, campbellbarton, JacquesLucke, mont29
Subscribers: abdelmatinboulbayam, amir.shehata
Differential Revision: https://developer.blender.org/D4143
|
|
Indentation & trailing space.
|
|
|
|
|
|
Makes it simpler to make some changes...
Also fix order of some includes (use alphabetical please).
|
|
Only used for internal functions, follow 'GPU_batch.h' naming.
|
|
|
|
|
|
Add utility function to raise an error.
|
|
|
|
|
|
This isn't valid RST.
|
|
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
|
|
The user has to be encouraged to use the `program_set` or `program_set_builtin` before drawing.
This avoids problem with gl_context.
|
|
Differential Revision D3714
|
|
`_PyArg_ParseTupleAndKeywordsFast`
part of T47811 ("for faster argument parsing").
|
|
|
|
Differential Revision: https://developer.blender.org/D3688
|
|
|
|
|
|
Maybe it's still early to set the new drawing api for python.
But joining these two modules is an initial step.
```
>>> gpu.
matrix
select
types
```
```
>>> gpu.types.GPU
Batch(
OffScreen(
VertBuf(
VertFormat(
```
The creation of a new offscreen object is now done by the `GPUOffscreen.__new__` method.
Reviewers: campbellbarton, dfelinto
Reviewed By: campbellbarton, dfelinto
Tags: #bf_blender_2.8
Differential Revision: https://developer.blender.org/D3667
|