blender.git
18 months agoMerge branch 'master' into blender2.8
Sergey Sharybin [Wed, 4 Apr 2018 10:57:36 +0000 (12:57 +0200)]
Merge branch 'master' into blender2.8

18 months agoDepsgraph: Make sure textures used by modifiers are in the graph
Sergey Sharybin [Wed, 4 Apr 2018 10:55:38 +0000 (12:55 +0200)]
Depsgraph: Make sure textures used by modifiers are in the graph

18 months agoProper fix for T54337
Mai Lavelle [Wed, 4 Apr 2018 10:32:39 +0000 (06:32 -0400)]
Proper fix for T54337

Accidentally checked the wrong variable in fa01a1738bd1e3a6750ff.

18 months agoFix undefined workspace in UI script
Sergey Sharybin [Wed, 4 Apr 2018 10:33:00 +0000 (12:33 +0200)]
Fix undefined workspace in UI script

18 months agoFix Eevee crash with generated coordinates on non-objects.
Brecht Van Lommel [Wed, 4 Apr 2018 10:26:57 +0000 (12:26 +0200)]
Fix Eevee crash with generated coordinates on non-objects.

18 months agoCleanup: simplify fix for T53497, this part is not strictly needed.
Brecht Van Lommel [Wed, 4 Apr 2018 10:15:27 +0000 (12:15 +0200)]
Cleanup: simplify fix for T53497, this part is not strictly needed.

18 months agoMerge branch 'master' into blender2.8
Bastien Montagne [Wed, 4 Apr 2018 10:00:57 +0000 (12:00 +0200)]
Merge branch 'master' into blender2.8

Conflicts:
source/blender/blenloader/intern/readfile.c

18 months agoTweak ID->tag reset on file load (no visible change expected!).
Bastien Montagne [Wed, 4 Apr 2018 09:56:35 +0000 (11:56 +0200)]
Tweak ID->tag reset on file load (no visible change expected!).

Issue was, *some* IDs (like infamous nodetrees from materials etc.)
would not go through the 'main' read_libblock() func, so their tags were
never reset.

So now, we ensure direct_link_id() always clear the tags, and move
setting them in read_libblock() after the call to direct_link_id().

Needed for depsgraph, but general healthier fix actually.

18 months agoDepsgraph: Get pchan index from correct pose
Sergey Sharybin [Wed, 4 Apr 2018 09:55:06 +0000 (11:55 +0200)]
Depsgraph: Get pchan index from correct pose

This code should be replaced with evaluation-time ID block expansion,
but before that it will be helpful to get old design to work again.

18 months agoMerge branch 'master' into blender2.8
Sergey Sharybin [Wed, 4 Apr 2018 09:49:24 +0000 (11:49 +0200)]
Merge branch 'master' into blender2.8

18 months agoDepsgraph: Ensure root pchan is always found
Sergey Sharybin [Wed, 4 Apr 2018 09:49:01 +0000 (11:49 +0200)]
Depsgraph: Ensure root pchan is always found

18 months agoDepsgraph: Pass CoW version of object to armature update done
Sergey Sharybin [Wed, 4 Apr 2018 09:47:09 +0000 (11:47 +0200)]
Depsgraph: Pass CoW version of object to armature update done

18 months agoFix part of T53497: Eevee stuttering on macOS for the first few seconds of usage.
Brecht Van Lommel [Wed, 4 Apr 2018 09:13:13 +0000 (11:13 +0200)]
Fix part of T53497: Eevee stuttering on macOS for the first few seconds of usage.

The problem was that textures were assigned to different slots on different draw
calls, which caused shader specialization/patching by the driver. So the shader
would be compiled over and over until all possible assignments were used.

18 months agoFix missing hair in fishycat and everything else after particle recalc changes
Mai Lavelle [Sat, 31 Mar 2018 06:19:52 +0000 (02:19 -0400)]
Fix missing hair in fishycat and everything else after particle recalc changes

The cache was getting reset always, due to special case of flag being 0.

Bug introduced by: 44cd24a9cee9ffb14b5d26a622f

18 months agoMerge branch 'master' into blender2.8
Sergey Sharybin [Wed, 4 Apr 2018 08:36:39 +0000 (10:36 +0200)]
Merge branch 'master' into blender2.8

18 months agoDepsgraph: Assert that pchan index is always valid
Sergey Sharybin [Wed, 4 Apr 2018 08:35:32 +0000 (10:35 +0200)]
Depsgraph: Assert that pchan index is always valid

18 months agoMerge branch 'master' into blender2.8
Sergey Sharybin [Wed, 4 Apr 2018 08:16:38 +0000 (10:16 +0200)]
Merge branch 'master' into blender2.8

18 months agoDepsgraph: Add missing expansion od custom bone shapes
Sergey Sharybin [Wed, 4 Apr 2018 08:15:45 +0000 (10:15 +0200)]
Depsgraph: Add missing expansion od custom bone shapes

This was fixed in 2.8 branch but not in master.

18 months agoMerge branch 'master' into blender2.8
Sergey Sharybin [Wed, 4 Apr 2018 07:54:50 +0000 (09:54 +0200)]
Merge branch 'master' into blender2.8

18 months agoDepsgraph: Only bind ID-data and indices to depsgraph callbacks
Sergey Sharybin [Tue, 3 Apr 2018 15:23:43 +0000 (17:23 +0200)]
Depsgraph: Only bind ID-data and indices to depsgraph callbacks

This is a part of copy-on-write sanitization, to avoid all the checks
which were attempting to keep sub-data pointers intact.

Point is: ID pointers never change for CoW datablocks, but nested
data pointers might change when updating existing copy.

Solution: Only bind ID data pointers and index of sub-data.
This will make CoW datablock 7update function was easier in 2.8.

In master we were only using pose channel pointers in callbacks,
this is exactly what this commit addresses. A linear lookup array
is created on pose evaluation init and is thrown away afterwards.

One thing we might consider doing is to keep indexed array of
poses, similar to chanhash.

Reviewers: campbellbarton

Reviewed By: campbellbarton

Subscribers: dfelinto

Differential Revision: https://developer.blender.org/D3124

18 months agoFix T54337: Cycles crash with simple subd object in debug build
Mai Lavelle [Wed, 4 Apr 2018 03:36:35 +0000 (23:36 -0400)]
Fix T54337: Cycles crash with simple subd object in debug build

18 months agoFix T54400: Some GCN 1 cards available to select for use with Cycles
Mai Lavelle [Wed, 4 Apr 2018 03:09:38 +0000 (23:09 -0400)]
Fix T54400: Some GCN 1 cards available to select for use with Cycles

Hainan was missing from the list of GCN 1 cards.

18 months agoBMesh: remove redundant loop in select-next-active
Campbell Barton [Tue, 3 Apr 2018 16:32:55 +0000 (18:32 +0200)]
BMesh: remove redundant loop in select-next-active

Thanks to @nBurn for spotting

18 months agoMissed in last merge
Campbell Barton [Tue, 3 Apr 2018 16:22:52 +0000 (18:22 +0200)]
Missed in last merge

18 months agoMissed in last merge
Campbell Barton [Tue, 3 Apr 2018 16:22:05 +0000 (18:22 +0200)]
Missed in last merge

18 months agoMerge branch 'master' into blender2.8
Campbell Barton [Tue, 3 Apr 2018 16:12:39 +0000 (18:12 +0200)]
Merge branch 'master' into blender2.8

18 months agoUndo: make id-map use binary search to keep sorted
Campbell Barton [Tue, 3 Apr 2018 16:07:51 +0000 (18:07 +0200)]
Undo: make id-map use binary search to keep sorted

18 months agoFix own error w/ undo ID lookup
Campbell Barton [Tue, 3 Apr 2018 15:58:37 +0000 (17:58 +0200)]
Fix own error w/ undo ID lookup

Was testing with small number of items, so this went unnoticed.

18 months agoDraw Manager: Improve description of `draw_frustum_boundbox_calc` variables
Germano [Tue, 3 Apr 2018 15:18:56 +0000 (12:18 -0300)]
Draw Manager: Improve description of `draw_frustum_boundbox_calc` variables

18 months agoCleanup: rename BMesh count_ex -> count_at_most
Campbell Barton [Tue, 3 Apr 2018 15:06:36 +0000 (17:06 +0200)]
Cleanup: rename BMesh count_ex -> count_at_most

18 months agoCleanup: rename list count_ex -> count_at_most
Campbell Barton [Tue, 3 Apr 2018 15:05:21 +0000 (17:05 +0200)]
Cleanup: rename list count_ex -> count_at_most

18 months agoUndo: use with_prev verisons of id-map lookups
Campbell Barton [Tue, 3 Apr 2018 15:03:13 +0000 (17:03 +0200)]
Undo: use with_prev verisons of id-map lookups

18 months agoUndo: use general id-map for image undo lookups.
Campbell Barton [Tue, 3 Apr 2018 14:47:25 +0000 (16:47 +0200)]
Undo: use general id-map for image undo lookups.

Was doing own name based lookups to keep compatible w/ global undo.

18 months agoUndo System: id-map avoid duplicate add/lookup
Campbell Barton [Tue, 3 Apr 2018 14:46:11 +0000 (16:46 +0200)]
Undo System: id-map avoid duplicate add/lookup

Add versions of add/lookup that check the previous item.

18 months agoFix mistake logging w/ undo
Campbell Barton [Tue, 3 Apr 2018 14:45:05 +0000 (16:45 +0200)]
Fix mistake logging w/ undo

18 months agoMerge branch 'master' into blender2.8
Bastien Montagne [Tue, 3 Apr 2018 14:13:13 +0000 (16:13 +0200)]
Merge branch 'master' into blender2.8

18 months agoFix T54477: Broken utf8 strings in old .blend files
Bastien Montagne [Tue, 3 Apr 2018 13:50:49 +0000 (15:50 +0200)]
Fix T54477: Broken utf8 strings in old .blend files

Back in the days (2.4x and before), it was rather easy to get some
invalid utf-8 strings in Blender. This is totally breaking modern code,
so this commit adds a simple 'check & fix strings' operator, available
from the main File menu.

18 months agoFix (unreported) crash when accessing some bl_rna.properties.
Bastien Montagne [Tue, 3 Apr 2018 12:30:36 +0000 (14:30 +0200)]
Fix (unreported) crash when accessing some bl_rna.properties.

E.g. typing `bpy.data.bl_rna.properties[8].<tab>` in console would hard-crash
trying to dereference NULL pointer. Was a missing check in rna_Property_tags_itemf().

18 months agoCleanup: remove unused mtexpoly array
Campbell Barton [Tue, 3 Apr 2018 12:30:12 +0000 (14:30 +0200)]
Cleanup: remove unused mtexpoly array

Not needed in 2.8

18 months agoMerge branch 'master' into blender2.8
Campbell Barton [Tue, 3 Apr 2018 12:19:51 +0000 (14:19 +0200)]
Merge branch 'master' into blender2.8

18 months agoFix duplicate Cycles panels in properties editor.
Brecht Van Lommel [Tue, 3 Apr 2018 12:04:59 +0000 (14:04 +0200)]
Fix duplicate Cycles panels in properties editor.

18 months agoFix crash on startup on macOS, after recent framebuffer refactoring.
Brecht Van Lommel [Tue, 3 Apr 2018 07:35:22 +0000 (09:35 +0200)]
Fix crash on startup on macOS, after recent framebuffer refactoring.

18 months agoUndo: remove particle undo push
Campbell Barton [Tue, 3 Apr 2018 06:57:01 +0000 (08:57 +0200)]
Undo: remove particle undo push

Was only called on copy particle system
which is already doing an undo push.

18 months agoCleanup: editor BKE_main includes
Campbell Barton [Tue, 3 Apr 2018 06:42:12 +0000 (08:42 +0200)]
Cleanup: editor BKE_main includes

18 months agoUndo: replace global access w/ ED_undo_stack_get
Campbell Barton [Tue, 3 Apr 2018 06:35:42 +0000 (08:35 +0200)]
Undo: replace global access w/ ED_undo_stack_get

While I'd like to avoid using this too much since the operator
system should handle.
It's less trouble than accessing it inline each time.

18 months agoFix mode switching error on undo
Campbell Barton [Tue, 3 Apr 2018 06:03:43 +0000 (08:03 +0200)]
Fix mode switching error on undo

For 2.8 there is already a utility function for this,
wrap it - avoiding an undo step.

18 months agoCorrect own error in string lookup
Campbell Barton [Tue, 3 Apr 2018 05:44:37 +0000 (07:44 +0200)]
Correct own error in string lookup

18 months agoMove to Collection: Reduce memory leakage
Dalai Felinto [Mon, 2 Apr 2018 21:49:00 +0000 (18:49 -0300)]
Move to Collection: Reduce memory leakage

This is really minor but anyways, now it will only leak if you cancel the menu.
And that only if htis is the last time you called this operator before closing
Blender.

18 months agoMove to Collection: Use automatic fallback name for new collections popup
Dalai Felinto [Mon, 2 Apr 2018 20:12:08 +0000 (17:12 -0300)]
Move to Collection: Use automatic fallback name for new collections popup

18 months agoCollections: API to get automatic name of new collection
Dalai Felinto [Mon, 2 Apr 2018 20:08:51 +0000 (17:08 -0300)]
Collections: API to get automatic name of new collection

18 months agoMove to Collection: Popup for naming new collection
Dalai Felinto [Mon, 2 Apr 2018 19:19:58 +0000 (16:19 -0300)]
Move to Collection: Popup for naming new collection

18 months agoFix blenderplayer (tm)
Dalai Felinto [Mon, 2 Apr 2018 20:24:18 +0000 (17:24 -0300)]
Fix blenderplayer (tm)

18 months agoPyAPI: Add PyC_Tuple_Pack_F64 utility
Campbell Barton [Mon, 2 Apr 2018 17:48:34 +0000 (19:48 +0200)]
PyAPI: Add PyC_Tuple_Pack_F64 utility

18 months agoBuild: add WITH_OPENVDB_3_ABI_COMPATIBLE option.
Brecht Van Lommel [Mon, 2 Apr 2018 16:55:10 +0000 (18:55 +0200)]
Build: add WITH_OPENVDB_3_ABI_COMPATIBLE option.

Better fix for T54457. It seems Debian compiles OpenVDB without ABI 3
compatibility, while Arch does enable it as is the default in the OpeVDB
CMake build system.

So now there's an option that the distribution can set depending on how
they compile their OpenVDB package.

18 months agoUI: Fix: Center vertical scrollbar circles.
Clément Foucault [Sun, 1 Apr 2018 09:50:30 +0000 (11:50 +0200)]
UI: Fix: Center vertical scrollbar circles.

18 months agoUI: Perf: Batch Trias with widgets.
Clément Foucault [Sun, 1 Apr 2018 09:49:15 +0000 (11:49 +0200)]
UI: Perf: Batch Trias with widgets.

This remove another portion of imm calls and reduce overall drawcall count.

18 months agoCleanup: remove redundant imbuf return values
Campbell Barton [Mon, 2 Apr 2018 15:30:35 +0000 (17:30 +0200)]
Cleanup: remove redundant imbuf return values

Some functions always returned the input argument
which was never used.

This made code read as if there might be a leak.

Now return a boolean (true the imbuf is modified).

18 months agoPartial fix for T54491: Use a more accurate solution to calculate the frustum boundbox
Germano [Mon, 2 Apr 2018 15:21:09 +0000 (12:21 -0300)]
Partial fix for T54491: Use a more accurate solution to calculate the frustum boundbox

18 months agoBuild: fixes for the Intel compiler versions 2016, 2017, 2018.
Milan Jaros [Mon, 2 Apr 2018 14:11:11 +0000 (16:11 +0200)]
Build: fixes for the Intel compiler versions 2016, 2017, 2018.

Differential Revision: https://developer.blender.org/D3109

18 months agoCleanup: newlines left in messages
Campbell Barton [Mon, 2 Apr 2018 13:39:43 +0000 (15:39 +0200)]
Cleanup: newlines left in messages

18 months agoMerge branch 'master' into blender2.8
Campbell Barton [Mon, 2 Apr 2018 13:18:10 +0000 (15:18 +0200)]
Merge branch 'master' into blender2.8

18 months agoCleanup: remove unused view_layer argument
Campbell Barton [Mon, 2 Apr 2018 13:11:53 +0000 (15:11 +0200)]
Cleanup: remove unused view_layer argument

18 months agoCleanup: move undo into it's own directory
Campbell Barton [Mon, 2 Apr 2018 13:02:08 +0000 (15:02 +0200)]
Cleanup: move undo into it's own directory

Split out undo API from ED_util.h into ED_undo.h

18 months agoCleanup: move BKE_global include under ifdef's
Campbell Barton [Mon, 2 Apr 2018 12:19:44 +0000 (14:19 +0200)]
Cleanup: move BKE_global include under ifdef's

18 months agoUndo: store active curve shape key in edit-mode
Campbell Barton [Mon, 2 Apr 2018 09:35:33 +0000 (11:35 +0200)]
Undo: store active curve shape key in edit-mode

18 months agoLogging: use for Python API
Campbell Barton [Mon, 2 Apr 2018 09:05:15 +0000 (11:05 +0200)]
Logging: use for Python API

Adds categories "bpy.context" & "bpy.rna"

18 months agoimbuf: revert some of the changes of rBb6ba3c682dd6615e760905572a5bcd69bb46371f since...
Ray Molenkamp [Sun, 1 Apr 2018 21:17:17 +0000 (15:17 -0600)]
imbuf: revert some of the changes of rBb6ba3c682dd6615e760905572a5bcd69bb46371f since they broke the build.

18 months agoFix compiling with Alembic
Sergej Reich [Sun, 1 Apr 2018 17:50:19 +0000 (19:50 +0200)]
Fix compiling with Alembic

Still need G.main

18 months agoWorkaround for undo steps not storing object modes
Campbell Barton [Sun, 1 Apr 2018 17:28:26 +0000 (19:28 +0200)]
Workaround for undo steps not storing object modes

18 months agoMerge branch 'master' into blender2.8
Campbell Barton [Sun, 1 Apr 2018 09:14:09 +0000 (11:14 +0200)]
Merge branch 'master' into blender2.8

18 months agoMerge branch 'master' into blender2.8
Campbell Barton [Sun, 1 Apr 2018 09:03:25 +0000 (11:03 +0200)]
Merge branch 'master' into blender2.8

- Undo that changes modes currently asserts,
  since undo is now screen data.

  Most likely we will change how object mode and workspaces work
  since it's not practical/maintainable at the moment.

- Removed view_layer from particle settings
  (wasn't needed and complicated undo).

18 months agoCorrect accidental changes by C Logging addition
Campbell Barton [Sun, 1 Apr 2018 08:16:28 +0000 (10:16 +0200)]
Correct accidental changes by C Logging addition

Error in 891c1cfc9a3

18 months agoResolve unsigned comparison error w/ MSVC
Campbell Barton [Sun, 1 Apr 2018 05:41:23 +0000 (07:41 +0200)]
Resolve unsigned comparison error w/ MSVC

18 months agoCleanup: remove global header
Campbell Barton [Sun, 1 Apr 2018 05:24:45 +0000 (07:24 +0200)]
Cleanup: remove global header

18 months agoCleanup: warning
Campbell Barton [Sat, 31 Mar 2018 21:51:38 +0000 (23:51 +0200)]
Cleanup: warning

18 months agoRemoved by accident in last commit
Campbell Barton [Sat, 31 Mar 2018 21:47:05 +0000 (23:47 +0200)]
Removed by accident in last commit

18 months agoUndo: unified undo system w/ linear history
Campbell Barton [Mon, 19 Mar 2018 13:17:59 +0000 (14:17 +0100)]
Undo: unified undo system w/ linear history

- Use a single undo history for all operations.
- UndoType's are registered and poll the context to check if they
  should be used when performing an undo push.
- Mode switching is used to ensure the state is correct before
  undo data is restored.
- Some undo types accumulate changes (image & text editing)
  others store the state multiple times (with de-duplication).
  This is supported by checking UndoStack.mode `ACCUMULATE` / `STORE`.
- Each undo step stores ID datablocks they use with utilities to help
  manage restoring correct ID's.
  Needed since global undo is now mixed with other modes undo.
- Currently performs each undo step when going up/down history
  Previously this wasn't done, making history fail in some cases.
  This can be optimized to skip some combinations of undo steps.

grease-pencil is an exception which has not been updated
since it integrates undo into the draw-session.

See D3113

18 months agoBLF: Remove debug print
Clément Foucault [Sat, 31 Mar 2018 18:33:05 +0000 (20:33 +0200)]
BLF: Remove debug print

"this is not the commit you're looking for"

18 months agoBLF: Fix Vertical/Horizontal layout switch.
Clément Foucault [Sat, 31 Mar 2018 18:26:09 +0000 (20:26 +0200)]
BLF: Fix Vertical/Horizontal layout switch.

This was breaking the first drawcall after a simple/non-simple shader
switch.

18 months agoUI: Perf: Batch icons drawcalls together.
Clément Foucault [Sat, 31 Mar 2018 17:32:28 +0000 (19:32 +0200)]
UI: Perf: Batch icons drawcalls together.

For this we use a new shader that gets it's data from a uniform array.
Vertex shader position the vertices using these data.

Using glUniform is way faster than using imm for that matter.

Like BLF rendering, UI icons are always (as far as I know) non occluded and
displayed above everything else. They also does not overlap with texts so
they can be batched at the same time.

18 months agoBLF: Perf: Do not call FT_Set_Char_Size every time.
Clément Foucault [Sat, 31 Mar 2018 14:12:00 +0000 (16:12 +0200)]
BLF: Perf: Do not call FT_Set_Char_Size every time.

Using FT_Set_Char_Size is slow. Calling it only when needed is more clever.

18 months agoBLF: Perf: Add a kerning cache table for ascii chars.
Clément Foucault [Sat, 31 Mar 2018 13:24:10 +0000 (15:24 +0200)]
BLF: Perf: Add a kerning cache table for ascii chars.

This adds less than a megabyte of mem usage.
FT_Get_Kerning was the 2nd hotspot when profilling. This commit completly
remove this cost.

One concern though: I don't know if the kerning data is constant for every
sizes but it seems to be the case. I tested different fonts at different
dpi scalling and saw no differences.

18 months agoBLI_sort_utils: add pointer sorting callback
Campbell Barton [Sat, 31 Mar 2018 17:25:27 +0000 (19:25 +0200)]
BLI_sort_utils: add pointer sorting callback

Also rename Pointer -> Ptr

18 months agoLogging: fix own error with formatting
Campbell Barton [Sat, 31 Mar 2018 13:43:47 +0000 (15:43 +0200)]
Logging: fix own error with formatting

18 months agoUse int instead of bool
Campbell Barton [Sat, 31 Mar 2018 13:33:15 +0000 (15:33 +0200)]
Use int instead of bool

Causes issues when including in some files.

18 months agoLogging: add argument --log-show-basename
Campbell Barton [Sat, 31 Mar 2018 13:27:06 +0000 (15:27 +0200)]
Logging: add argument --log-show-basename

Optionally strips leading path from filenames when logging.

18 months agoCleanup: --help text output
Campbell Barton [Sat, 31 Mar 2018 12:53:15 +0000 (14:53 +0200)]
Cleanup: --help text output

Some arguments missed their <value>.

18 months agoCleanup: blf internal struct naming
Campbell Barton [Sat, 31 Mar 2018 11:40:23 +0000 (13:40 +0200)]
Cleanup: blf internal struct naming

- use x/y/width/height/max as a suffix.
- replace 'num' prefix /w 'len' suffix.

18 months agoCleanup: BLF batch drawing naming
Campbell Barton [Sat, 31 Mar 2018 11:09:03 +0000 (13:09 +0200)]
Cleanup: BLF batch drawing naming

- batching -> batch_draw.
- ct & size -> len.
- start/end -> begin/end (follow GL convention).

18 months agoLogging: add ability to exclude categories.
Campbell Barton [Sat, 31 Mar 2018 10:52:47 +0000 (12:52 +0200)]
Logging: add ability to exclude categories.

18 months agoDocs: doxygen docs for clog
Campbell Barton [Sat, 31 Mar 2018 10:26:37 +0000 (12:26 +0200)]
Docs: doxygen docs for clog

18 months agoFix clog: own error allocating from static buffer
Campbell Barton [Sat, 31 Mar 2018 09:25:49 +0000 (11:25 +0200)]
Fix clog: own error allocating from static buffer

18 months agoFix logger build w/ MSVC
Campbell Barton [Sat, 31 Mar 2018 07:18:30 +0000 (09:18 +0200)]
Fix logger build w/ MSVC

18 months agoBuild deps: do sndfile patch also on linux platform
Arto Kitula [Fri, 30 Mar 2018 23:15:13 +0000 (02:15 +0300)]
Build deps: do sndfile patch also on linux platform

18 months agoGWN: Perf: Bypass glUseProgram(0)
Clément Foucault [Fri, 30 Mar 2018 21:27:45 +0000 (23:27 +0200)]
GWN: Perf: Bypass glUseProgram(0)

I left a flag to quickly debug if something is wrong.
But now that everything uses shader, it seems to be alright since a shader
is always set active before drawing.

18 months agoUI: Perf: Do not use implicit Attrib fill.
Clément Foucault [Fri, 30 Mar 2018 20:51:28 +0000 (22:51 +0200)]
UI: Perf: Do not use implicit Attrib fill.

18 months agoBFL: Fix broken vertical texts.
Clément Foucault [Fri, 30 Mar 2018 20:50:17 +0000 (22:50 +0200)]
BFL: Fix broken vertical texts.

I've made a separate version of the geom shader that works with full
3D modelviewmat.

This commit also includes some fixup inside blf_batching_start().

18 months agoDRW: Add BLF_batch_reset to be able to use BLF inside DRW.
Clément Foucault [Fri, 30 Mar 2018 19:10:24 +0000 (21:10 +0200)]
DRW: Add BLF_batch_reset to be able to use BLF inside DRW.

18 months agoUI: Perf: Add BLF batching for File browser and UI blocks.
Clément Foucault [Fri, 30 Mar 2018 19:09:24 +0000 (21:09 +0200)]
UI: Perf: Add BLF batching for File browser and UI blocks.

This batch together most of the calls that can be batch together.

18 months agoBLF: Add Batching capabilities.
Clément Foucault [Fri, 30 Mar 2018 18:59:45 +0000 (20:59 +0200)]
BLF: Add Batching capabilities.

You can now use BLF_batching_start and BLF_batching_end to batch every
drawcall to BLF together minimizing the overhead introduced by BLF and the
opengl driver.

These calls cannot be nested (for now).

If the modelview matrix changes, previously batched calls are issued and a
the process resume with the new matrix.

However the projection matrix MUST not change and gl scissors as well.