Age | Commit message (Collapse) | Author |
|
|
|
dimensions is 0.
|
|
fix T63936 introduced in 86914e713347.
Reviewers: fclem
Reviewed By: fclem
Tags: #bf_blender
Maniphest Tasks: T63936
Differential Revision: https://developer.blender.org/D4750
|
|
|
|
|
|
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
|
|
This prevents the use of uninitialized buffer.
In addition, use `memset` instead of assigning in a loop.
|
|
From rBd5cb425b8745
|
|
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.
|
|
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.
|
|
Deprecated GL_SELECT no longer works in OpenGL core profile, so there is no
reason to have this.
|
|
|
|
|
|
Changed 2.8x code so this is no longer needed.
|
|
|
|
|
|
|
|
Needed for depth picking in 2.8
|
|
|
|
Add utility function to get the nearest hit
|
|
|
|
Also don't do second pass when the first has no hits.
|
|
GL_SELECT is really slow in this branch and will be removed.
For now we simply change AUTO behavior to avoid possible conflicts with merges
and upcoming color-id-based selection.
|
|
Intended to replace legacy GL_SELECT, without the limitations of
sample queries which can't access depth information.
This commit adds VIEW3D_SELECT_PICK_NEAREST and VIEW3D_SELECT_PICK_ALL
which access the depth buffers to detect whats under the pointer,
so initial selection is always the closest item.
The performance of this method depends a lot on the OpenGL
implementations glReadPixels.
Since reading depth can be slow, buffers are cached for object picking
so selecting re-uses depth data, performing 1 draw instead of 3
(for 24, 18, 10 px regions, picking with many items under the pointer).
Occlusion queries draw twice when picking nearest,
so worst case 6x draw calls per selection.
Even with these improvements occlusion queries is faster on AMD hardware.
Depth selection is disabled by default, toggle option under select method.
May enable by default if this works well on different hardware.
Reviewed as D2543
|
|
|
|
|
|
|
|
Latest nouveau drivers have a bug here, use occlusion queries.
|
|
|
|
|
|
Naming here is slightly misleading. We have:
* Number of elements (objects) that can be picked
* Buffer size
* Number of integers in buffer.
Interestingly enough, bufsize in OpenGL (as far as I could find in
examples on the web) and in most of the code refers to the latter and
actual buffer size is only used whenever we do allocations on the heap.
Added an extra defines here to make things a bit clearer:
* MAXPICKELEMS refers to the number of objects that can be picked
* MAXPICKBUF refers to the number of integers in the selection buffer
Also made all buffers use MAXPICKBUF where some used MAXPICKBUF * 4.
That means that some parts of blender will use less space for selection
now. MAXPICKBUF is set to 10000 for 2500 object selection, which can be
changed at any time, but I think 10000 integers on the stack touches the
borders of uglyland anyway.
|
|
|
|
|
|
|
|
|
|
|
|
https://developer.blender.org/D643
Separates graphics context creation from window code in Ghost so that they can vary separately.
|
|
Attempt to select closest bones when possible.
Occlusion query selection does't support this well because we can't
really derive depth information from occlusion tests. May be possible to
improve this somewhat in the future.
|
|
This patch creates an interface for selection mechanisms in opengl. This
makes it possible to switch between occlusion query based or select
rendermode based selection transparently.
This is really useful on graphics drivers that do not accelerate the
select rendermode path (some ATI cards are notorious for this, and the
new path is used by default there), since occlusion queries are always
hardware accelerated due to their use in games.
The option can be found under system - selection. Auto just enables
occlusion queries for ATI users while the rest of the options enforce
one of the two methods always.
There is just one known change, previous code enforced nearest bone to
always get selected, even when mouse selecting near the same position, I
couldn't replicate the behaviour though.
patch by me with edits and review by Campbell.
Thanks!
|