d39043b5ae
Revert "Revert "BGL: Workaround broken bgl usage caused by GPU refactor""
...
This reverts commit f23bf4cb10 .
2020-10-09 16:33:59 +02:00
f23bf4cb10
Revert "BGL: Workaround broken bgl usage caused by GPU refactor"
...
This reverts commit f12b0373f3 .
2020-10-08 17:58:38 +02:00
f12b0373f3
BGL: Workaround broken bgl usage caused by GPU refactor
...
This directly adress the issues caused by rB536c2e0ec916.
Since the state tracking is done at a lower level, using the bgl
functions needs to be safegarded by the state manager.
The current workaround is to bypass `apply_state` when inside a
callback that used a `bgl` function.
Related to T80730.
This fix T81003.
Also this fix the default blend equation for callbacks.
Fixes T80169 T81289.
2020-10-08 16:36:17 +02:00
6432fa488a
Cleanup: Remove GLEW dependencies outside of GL module
2020-09-12 15:51:21 +02:00
efa7aaa97f
Cleanup: use const variables where possible in the Python API
2020-08-20 16:10:13 +10:00
3090b52f8c
Cleanup: PyBGL, Clang-Tidy readability-function-size fixes
...
This addresses warnings from Clang-Tidy's `readability-function-size`
rule in the `source/blender/python` module.
It's just `BPyInit_bgl()` that's been split up into one or two smaller
functions per OpenGL version.
No functional changes.
2020-08-07 15:54:28 +02:00
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
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
2a6df7dfe5
Cleanup: use named unsigned types in the Python API
2020-02-20 15:40:05 +11:00
9a9f39e466
Cleanup: remove redundant 'char *' casts
2019-12-20 10:42:57 +11:00
87ebc4ef4f
Fix T70060: Add bgl wrapper for glVertexAttribIPointer
2019-09-19 12:54:37 +02:00
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
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
dbc058301b
Cleanup: trailing commas
2019-04-16 16:40:47 +02:00
25ec4b437f
Cleanup: style, use braces for the Python API
2019-03-30 07:14:28 +11:00
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
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
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
744f633986
Cleanup: trailing commas
...
Needed for clan-format not to wrap onto one line.
2019-02-03 14:59:11 +11:00
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
f20dbc293f
Cleanup: blank lines over doxy headers
2019-01-26 21:43:24 +11:00
8a61ea7296
Cleanup: add trailing commas
...
Prevents clang-format merging into a single line.
2019-01-19 13:58:35 +11:00
0373ff5e9c
Cleanup: end bgl macros w/ semicolon
...
Needed for clang-format.
2019-01-10 12:38:11 +11:00
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
91bfea5b05
CPython: py_capi_utils: use more descriptive names for format string utilities.
2018-10-07 12:21:09 -03:00
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
0f55334413
Cleanup: use new format string utility
2018-10-06 00:13:54 -03:00
9682e43bf9
BGL: Wrap glBlitFramebuffer
2018-09-24 13:12:50 -03:00
5b64301834
Merge branch 'master' into blender2.8
2018-06-04 09:06:14 +02:00
7719c11006
Cleanup: strip trailing space in Python module
2018-06-04 08:54:40 +02:00
b107e77e46
BGL: Expose OpenGL API for FrameBuffers and RenderBuffers.
2018-04-14 02:25:18 -03:00
4db67aab06
Fix OpenGL extension report in system info operator.
2017-10-23 22:22:22 +03:00
54f9a6e5da
Merge branch 'master' into blender2.8
2017-10-18 16:40:31 +11:00
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
ea606a7847
Merge branch 'master' into blender28
2017-10-06 21:25:33 +11:00
c454d816a9
Cleanup: style
2017-10-06 16:56:41 +11:00
7fdb9e168d
Merge branch 'master' into blender2.8
2017-09-28 16:13:09 +05:00
1f18523edf
Cleanup: switch fall-through warning
2017-09-28 13:41:54 +10:00
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
cc8c064f11
Merge branch 'master' into blender2.8
2017-09-28 03:05:46 +10:00
6c98859b77
Cleanup: warning
2017-09-28 02:04:58 +10:00
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
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
0e40f1bac4
OpenGL: remove GLU functions from Python API
...
Part of T49042
2017-03-13 14:08:03 -04:00
c1f43c9dc6
Cleanup: warnings
2017-03-02 00:36:33 +11:00
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
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
b8417501ab
Cleanup: suspicious use of commas
2016-03-04 16:38:41 +11:00