Commit Graph

103 Commits

Author SHA1 Message Date
Sybren A. Stüvel
3d48d99647 Cleanup: Python, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/python` module.

No functional changes.
2020-08-07 13:38:07 +02:00
Jacques Lucke
725973485a Clang Tidy: enable readability-non-const-parameter warning
Clang Tidy reported a couple of false positives. I disabled
those `NOLINTNEXTLINE`.

Differential Revision: https://developer.blender.org/D8199
2020-07-13 11:27:09 +02:00
Campbell Barton
2a6df7dfe5 Cleanup: use named unsigned types in the Python API 2020-02-20 15:40:05 +11:00
Campbell Barton
9a9f39e466 Cleanup: remove redundant 'char *' casts 2019-12-20 10:42:57 +11:00
Jacques Lucke
87ebc4ef4f Fix T70060: Add bgl wrapper for glVertexAttribIPointer 2019-09-19 12:54:37 +02:00
Brecht Van Lommel
5cfeba72f1 Python API: allow passing integer to some BGL functions instead of bgl.Buffer
These parameters can be both pointers and offsets into a bound buffer, so we
need to support both even if it's possible to cause crashes this way.
2019-04-18 14:28:37 +02:00
Campbell Barton
e12c08e8d1 ClangFormat: apply to source, most of intern
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
2019-04-17 06:21:24 +02:00
Campbell Barton
dbc058301b Cleanup: trailing commas 2019-04-16 16:40:47 +02:00
Campbell Barton
25ec4b437f Cleanup: style, use braces for the Python API 2019-03-30 07:14:28 +11:00
Brecht Van Lommel
85915ae1aa Python API: allow passing None to some BGL functions instead of bgl.Buffer
Many OpenGL functions take NULL pointers, passing those was quite complicated
with some addons even using ctypes to manipulate internal bgl.Buffer pointers.
2019-03-26 19:56:43 +01:00
Campbell Barton
de13d0a80c doxygen: add newline after \file
While \file doesn't need an argument, it can't have another doxy
command after it.
2019-02-18 08:22:12 +11:00
Campbell Barton
eef4077f18 Cleanup: remove redundant doxygen \file argument
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
2019-02-06 15:45:22 +11:00
Campbell Barton
744f633986 Cleanup: trailing commas
Needed for clan-format not to wrap onto one line.
2019-02-03 14:59:11 +11:00
Campbell Barton
65ec7ec524 Cleanup: remove redundant, invalid info from headers
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.
2019-02-02 01:36:28 +11:00
Campbell Barton
f20dbc293f Cleanup: blank lines over doxy headers 2019-01-26 21:43:24 +11:00
Campbell Barton
8a61ea7296 Cleanup: add trailing commas
Prevents clang-format merging into a single line.
2019-01-19 13:58:35 +11:00
Campbell Barton
0373ff5e9c Cleanup: end bgl macros w/ semicolon
Needed for clang-format.
2019-01-10 12:38:11 +11:00
Campbell Barton
d022794cad Cleanup: rename checks for Python struct strings
Using 'format' prefix made this read as if t was for string formatting.

Use 'PyC_StructFmt' prefix instead since these values are compatible
with formatting from Python's 'struct' module.
2018-10-08 08:37:32 +11:00
mano-wii
91bfea5b05 CPython: py_capi_utils: use more descriptive names for format string utilities. 2018-10-07 12:21:09 -03:00
mano-wii
495a7128cb Cleanup: use the naming convention in py_capi_utils
And use inline functions instead of preprocessor directives.
2018-10-06 01:15:15 -03:00
mano-wii
0f55334413 Cleanup: use new format string utility 2018-10-06 00:13:54 -03:00
mano-wii
9682e43bf9 BGL: Wrap glBlitFramebuffer 2018-09-24 13:12:50 -03:00
Campbell Barton
5b64301834 Merge branch 'master' into blender2.8 2018-06-04 09:06:14 +02:00
Campbell Barton
7719c11006 Cleanup: strip trailing space in Python module 2018-06-04 08:54:40 +02:00
Germano
b107e77e46 BGL: Expose OpenGL API for FrameBuffers and RenderBuffers. 2018-04-14 02:25:18 -03:00
Antony Riakiotakis
4db67aab06 Fix OpenGL extension report in system info operator. 2017-10-23 22:22:22 +03:00
Campbell Barton
54f9a6e5da Merge branch 'master' into blender2.8 2017-10-18 16:40:31 +11:00
Germano
0a435d49ba Fix T53074: Use the pybuffer->itemsize to get the corresponding GLtype
It seems that `typestr` does not always define the final size of the element. And it varies by operating system.

Then use the `typestr` only to know the itemtype is `float` type or not.
2017-10-17 12:06:52 -02:00
Campbell Barton
ea606a7847 Merge branch 'master' into blender28 2017-10-06 21:25:33 +11:00
Campbell Barton
c454d816a9 Cleanup: style 2017-10-06 16:56:41 +11:00
Sergey Sharybin
7fdb9e168d Merge branch 'master' into blender2.8 2017-09-28 16:13:09 +05:00
Campbell Barton
1f18523edf Cleanup: switch fall-through warning 2017-09-28 13:41:54 +10:00
Germano
5c6e3ff497 bgl module: extend gl_buffer_type_from_py_format_char function to work with more string formats
Only basic types of character codes were being used
2017-09-27 16:07:06 -03:00
Campbell Barton
cc8c064f11 Merge branch 'master' into blender2.8 2017-09-28 03:05:46 +10:00
Campbell Barton
6c98859b77 Cleanup: warning 2017-09-28 02:04:58 +10:00
Germano
2de5e14f53 bgl module: Interpret a buffer as a bgl.Buffer
Differential Revision: https://developer.blender.org/D2857
2017-09-27 11:20:00 -03:00
Dalai Felinto
e5bf726f44 BGL: Remove deprecated enums
Note: The enums that are deprecated and supported are still there
2017-04-18 16:02:17 +02:00
Mike Erwin
b4157dedb0 OpenGL: remove packed imm mode functions from Python API
These are from the ARB_vertex_type_2_10_10_10_rev extension that became part of OpenGL 3.3.

So they are new, but only exist for compatibility with immediate mode, which is old.

Related to T49165 (general OpenGL upgrade)
2017-03-13 14:08:03 -04:00
Mike Erwin
0e40f1bac4 OpenGL: remove GLU functions from Python API
Part of T49042
2017-03-13 14:08:03 -04:00
Campbell Barton
c1f43c9dc6 Cleanup: warnings 2017-03-02 00:36:33 +11:00
Brecht Van Lommel
e9011100f7 Fix compiler warnings on macOS / clang / c++11. 2017-02-26 00:16:21 +01:00
Martijn Berger
5cbc7b6ed2 bgl do not bind parts of OpenGL that are not exposed in core profiles 2016-11-19 15:07:01 +01:00
Thomas Szepe
0d4961cc52 Fix typo in bgl.Buffer report function
A GL_INT buffer was reported as GL_BYTE.
2016-07-02 18:38:05 +02:00
Campbell Barton
b8417501ab Cleanup: suspicious use of commas 2016-03-04 16:38:41 +11:00
Campbell Barton
02b9921b75 bgl: fix implicit overflow 2015-09-10 03:59:18 +10:00
Campbell Barton
d4ca74c227 bgl: disable some defines not found in mesa 7 2015-09-10 03:54:40 +10:00
Martijn Berger
4e759d6735 Fixes T46060 Regenerated the full list of constants we should expose 2015-09-09 18:35:05 +02:00
Sergey Sharybin
a660f27527 Don't use GCC-only pragma for all compilers 2015-09-01 17:40:10 +05:00
Martijn Berger
230d93ad54 Fix bgl so that get-methods that take a string use strings instead of bgl buffer objects again 2015-08-03 12:20:08 +02:00
Campbell Barton
03f00eb91d Docs: doxy corrections 2015-07-31 23:44:37 +10:00