Commit Graph

50459 Commits

Author SHA1 Message Date
Campbell Barton
8cd7b42877 BMesh: Add option to use BMesh boolean modifier
This uses a bmesh-intersection, BLI_kdtree and watertight intersections to perform boolean operations.

For now keep both BMesh and Carve booleans usable at once for testing & bug reports,
however we plan to phase out Carve by next release.
2015-12-11 20:24:39 +11:00
Campbell Barton
1c742b4e9a Mistake in last commit 2015-12-11 18:12:46 +11:00
Campbell Barton
d70e0b6654 BMesh: Boolean as an edit-mode tool
Works much the same as intersect operator,
expose as a new operator since for users its quite different.

Access from face menu.

Internally, this adds boolean args to BM_mesh_intersect function.
2015-12-11 17:54:42 +11:00
Campbell Barton
9f3ed82f35 Correct error in recent commit w/ hole-filling
edge-groups weren't being sorted with 2d-coords applied.
2015-12-11 16:18:24 +11:00
dde4fc63ff Fix T46951: GLSL draw mode missing some textures. 2015-12-11 03:03:33 +01:00
Campbell Barton
c593855b29 BMesh: hole support for intersect tool
Support cutting many outlines into a single face (creating edges between isolated regions).
2015-12-11 12:01:22 +11:00
Campbell Barton
bb4bff3576 BMesh: Add BM_face_kill_loose
Removes edges/verts that become unused.
2015-12-11 12:01:22 +11:00
Campbell Barton
becc85c5d4 Math Lib: 2d ray-segment intersection function 2015-12-11 11:27:00 +11:00
Martijn Berger
810f825a39 MSVC 2015 fix, /WX warnings as errors is to restrictive for msvc 2015 currently for bmesh 2015-12-10 17:23:59 +01:00
Campbell Barton
2f57b1cece Fix for mistake in intersect duplicate list check
In practice this hardly ever happened.
2015-12-11 00:45:38 +11:00
Campbell Barton
5452df7984 BMesh: minor optimization for intersect
Avoid double lookup on insertion ghash
2015-12-10 23:42:52 +11:00
Martijn Berger
ffc750a4fa Begin to add some MSVC 2015 support 2015-12-10 11:57:13 +01:00
Campbell Barton
9a990eab0d Use 'peek' instead of 'last' for stack macro 2015-12-10 21:08:10 +11:00
f9047c3f8c Eigen: fold remaining OpenNL code into intern/eigen.
Differential Revision: https://developer.blender.org/D1662
2015-12-10 01:58:10 +01:00
858b680a50 Eigen: move C API into intern/eigen. 2015-12-10 01:58:06 +01:00
Campbell Barton
56a55f2849 CMake: include eigen as a system header 2015-12-09 18:55:18 +11:00
Campbell Barton
aaa56782d3 BMesh: move BM_face_split_edgenet to its own file
Isolate edge-net splitting in preparation for other functions to be added here.
2015-12-09 16:24:52 +11:00
Campbell Barton
1898c1f05c Math Lib: add axis_dominant_v3_ortho_single 2015-12-09 14:03:38 +11:00
0dfc8d6939 OpenGL: split off framebuffer, shader and texture code into separate files. 2015-12-08 19:00:56 +01:00
b25e4b310f OpenGL: remove non-power-of-two texture check, where even ES 2.0 does not need it. 2015-12-08 18:58:52 +01:00
Campbell Barton
af5784312a Correct recent OpenGL cleanup 2015-12-08 22:52:51 +11:00
Mike Erwin
b787341b09 OpenGL: use extension form of FBOs
FBOs are a GL 3.0 feature but enjoy nearly universal support via
extensions.

The newer ARB extension brings these features to GL 2.1 without needing
an ARB suffix.

The older EXT extensions *do* use a suffix. Since we don’t know which
is used until runtime, I added the suffix to all functions & enums.

Also updated the check to look for the FBO feature set instead of the
specific EXT extension.
2015-12-08 02:14:09 -05:00
Mike Erwin
6006173f4a OpenGL: use sized texture internal formats
Maybe this is pedantic but I read it’s best to explicitly set the
desired component size.

Also append “_ARB” to float texture formats since those need an
extension in GL 2.1.
2015-12-08 01:19:55 -05:00
Mike Erwin
c013d64a0a disable old Mac OpenGL workaround
Comment says this is from the MacOS 10.5 era. Surely it’s been fixed by
now. If nobody complains in the next few months let’s delete this.
2015-12-08 01:19:55 -05:00
Mike Erwin
c099b86238 OpenGL: simple cleanup
It’s still immediate mode, but at least it’s shorter & clearer.
2015-12-08 01:19:55 -05:00
Mitchell Stokes
964107fbce BGE code cleanup: Removing RAS_GLExtensionManager.
This class did nothing but print out extensions if they were found.
Instead, the code from bge.logic.PrintGLInfo() is now printed as the
Rasterizer is initialized. This gives better information, and it removes
some GL code from KX_PythonInit.cpp (the PrintGLInfo method now calls
the Rasterizer to print the information).

Differential Revision: https://developer.blender.org/D438
2015-12-07 19:25:12 -08:00
Mitchell Stokes
fe2f3a131d OpenGL/BGE: Remove RAS_StorageIM (glBegin/glEnd rendering of mesh data)
The only use we had for RAS_StorageIM was to render derived meshes using
Blender's mesh drawing. This is now handled as a special case in
RAS_OpenGLRasterizer instead of in RAS_StorageIM.

We are now left with RAS_StorageVA and RAS_StorageVBO. At the moment
vertex arrays are still the default since our vertex array with display
lists implementation is still much faster than our VBO code in a lot of
cases. As we improve our VBO code, we can drop vertex arrays since
Blender's minimum OpenGL version is being bumped up to 2.1, which
supports VBOs.
2015-12-07 19:05:09 -08:00
Mitchell Stokes
9d03307033 BGE: Remove RAS_IRasterizer::IndexPrimitivesMulti()
The work that was being done in IndexPrimitiveMulti() is now done by
IndexPrimitive() and we always assume multitexture support.
2015-12-07 19:05:04 -08:00
Campbell Barton
a4a5d85755 Python: remove support for Python 3.4 2015-12-08 12:35:29 +11:00
Bastien Montagne
187b7257ea Usual UI messages fixes. 2015-12-07 21:06:14 +01:00
Lukas Tönne
e65c647912 Added a comment to our use of the term 'adjoint' in BLI_math.
In modern usage this means the conjugate transpose, but we stick to
the classical usage (i.e. adjugate matrix), like Eigen does.
2015-12-07 12:35:36 +01:00
Campbell Barton
9e0757a367 BLI_linklist: add alloca append macro 2015-12-07 19:13:30 +11:00
Campbell Barton
41a2b97c30 Minor changes needed for standalone mathutils 2015-12-07 11:09:00 +11:00
Mike Erwin
50df05c35c OpenGL: remove old version check
+ minor cleanup
2015-12-06 18:26:10 -05:00
Mike Erwin
8cfcc444c6 OpenGL: new GPU_legacy_support() function
Is current context compatible with legacy GL (version 2.1)?

My earlier approach -- checking for GLEW_ARB_compatibility -- was not
enough.

This should always return true if we set our GL context up properly. It
will return false when we switch to core profile.
2015-12-06 18:02:07 -05:00
Bastien Montagne
8d09eecc50 Fix (unreported) Ocean modifier assuming all its faces are quads.
Would be true in most cases (and in particular with own generated geometry),
but in case one would be using original geometry this could have crashed badly.
2015-12-06 21:07:39 +01:00
Bastien Montagne
a78199332b Cleanup in main Ocean modifier code.
Note that I tried to parallelize the loops porting result of the simulation to the
DM data itself, but that ended up being 20% slower than non-threaded code!
2015-12-06 21:07:39 +01:00
4aab21f9be OpenGL: rename simple shader to basic shader. 2015-12-06 19:35:15 +01:00
cf921934b1 OpenGL: use simple shader for texture drawing in a few places.
Differential Revision: https://developer.blender.org/D1645
2015-12-06 19:35:15 +01:00
147f7a1e86 OpenGL: isolate fixed function lighting in simple shader code.
Differential Revision: https://developer.blender.org/D1645
2015-12-06 19:35:15 +01:00
42bff8bb1e OpenGL: use simple shader for armatures.
Differential Revision: https://developer.blender.org/D1645
2015-12-06 19:35:15 +01:00
9821fe6dc2 OpenGL: move two sided lighting check into GPU material code.
Differential Revision: https://developer.blender.org/D1645
2015-12-06 19:35:15 +01:00
82191b102f OpenGL: pass flag to indicate of drawMappedFaces needs to use normals.
Differential Revision: https://developer.blender.org/D1645
2015-12-06 19:35:15 +01:00
Bastien Montagne
1eed354e53 Switch Ocean modifier's geometry generation from OMP to BLI_task.
Compared to previous revision, this gives 20% speedup on the whole modifier evaluation!

Wondering a bit how improvement can be so impressive here, would have expected very
small increases given how simple is the code here... Maybe it's the fact we get rid
of many additional OMP threads (tests are done with ten Ocean mod evaluated in parallel)?
2015-12-06 18:59:20 +01:00
Bastien Montagne
b36a0c44bb Switch from OMP to BLI_task in BKE's part of Ocean simulation.
Not much to say, gives about 8% to 9% speedup in ocean simulation.
2015-12-06 17:37:10 +01:00
Campbell Barton
9964eed9ac PyAPI: add optional filter argument to KDTree.find 2015-12-06 21:35:32 +11:00
Campbell Barton
54b95c30ae BKI_kdtree: add a find that takes filter callback
Useful when we need to selectively ignore nodes.
2015-12-06 21:29:06 +11:00
Campbell Barton
ee719e8816 Cleanup: formatting (PyArg_ParseTuple) 2015-12-06 16:19:45 +11:00
Campbell Barton
13a578edb4 Cleanup: kdtree, redundant root node handling
For range checks we can put the root not in the stack.
2015-12-06 15:57:10 +11:00
Campbell Barton
8f12dad309 Fix generate UV's adding extra layers
Adding a new meshes when there were no faces would always add a new uv-layer.
2015-12-06 11:22:17 +11:00