Commit Graph

1985 Commits (bf939135a424d6ae4a09bf057460b48b18c21e62)

Author SHA1 Message Date
whitequark f0359556d8 Recompute property browser viewport on resize.
Before this commit, resizing the property browser would cut off
the rows at the bottom, or else add black space, until next refresh.

This could be perhaps more elegantly done by adding an onResize event
but given that each of them would be followed by onRender anyway, it
seems there's no benefit to adding onResize.
2019-11-23 15:04:31 +00:00
whitequark 54015b6777 Call glGetError() after glFinish(), not glFlush().
As I understand it, both glGetError() and glFinish() are serializing
and blockig, so it makes more sense to call them at the same time.
glFlush() does not block.
2019-11-23 14:50:19 +00:00
Thomas Roughton 9b61f988be macOS: Don't use offscreen rendering.
Since Catalina or earlier this no longer causes artifacts when Cocoa
controls are overlaid on a GL layer. Conversely, offscreen rendering
is very slow, especially on HiDPI screens.

Co-Authored-By: Koen Schmeets <hello@koenschmeets.nl>
2019-11-23 14:50:18 +00:00
Ryan A. Pavlik e386d405d6 Make some arguments const/const references, where possible. NFC.
Found and suggested by clang-tidy.May help performance by reducing copies,
depending on frequency of call, etc.
2019-11-23 14:07:31 +00:00
whitequark 65d0bdffdb Split Canvas::FinishFrame out of Canvas::FlushFrame.
When drawing the graphics window, we flush it twice: once to draw
the geometry, and another time to draw the UI overlay (toolbar,
selection marquee, and FPS counter). Calling glFinish() each time
is (on most platforms) just pointlessly slow, but on macOS Catalina,
without offscreen rendering, it causes the toolbar to flicker.

Instead of calling glFinish() twice per frame in that case, call
glFlush() twice and then glFinish() once we really are done.
2019-11-23 13:35:16 +00:00
ruevs ec3056773e Simplify UNION and DIFFERENCE boolean operations.
Union and difference are optimized by replacing the expression
  (!inShell && !inFace)
which is equivqlent to
  (!inShell && !inSame && !inOpp)
with
  outSide
which is equivalent, since SShell::Class::OUTSIDE is the only remaining possibility.
2019-11-23 13:22:15 +00:00
Koen Schmeets b5ccf5acf5 macOS: fix CMake Xcode generator.
This is done by setting `CMAKE_RUNTIME_OUTPUT_DIRECTORY` to `$<1:${CMAKE_BINARY_DIR}/bin>`
2019-11-23 13:20:45 +00:00
Koen Schmeets 0dcc8f3369 Fix Xcode auto-fixable issues 2019-11-23 13:08:22 +00:00
whitequark 74aa80b645 Fix misuse of glTexImage2D.
Per the OpenGL documentation:
> GL_INVALID_VALUE may be generated if level is greater than
> log2(max), where max is the returned value of GL_MAX_TEXTURE_SIZE.

Although we always passed `log2(max) + 1` as `level`, for some reason
none of the GL implementations we run on ever returned an error.
It also appears there is a bug in ANGLE that crashes the process
instead in this case if the C++ runtime performs bound checks on
vector::operator[]=.
2019-11-22 02:11:10 +00:00
KmolYuan 3583293076 Update AppVeyor Python version. 2019-11-21 13:53:11 +08:00
Yuan afefe6e2dd
Merge pull request #2 from pacew/python
typo in python quaternion_u
2019-11-21 13:45:51 +08:00
Pace Willisson 173d2b9e46 typo in python quaternion_u 2019-11-20 09:00:27 -05:00
KmolYuan d7af07e6ad Merge branch 'python' of https://github.com/KmolYuan/solvespace into python 2019-10-28 07:42:33 +08:00
KmolYuan 8795237497 Add Python 3.8 CI. 2019-10-27 20:58:21 +08:00
KmolYuan 1cd310dabf Update Python 3.8 to stable version. 2019-10-26 23:29:25 +08:00
KmolYuan 700f0106e0 Remove unused macro. 2019-10-26 22:07:27 +08:00
KmolYuan 74bc01193a Update compiler options and patches. 2019-10-26 11:33:02 +08:00
KmolYuan 1771ae45ca Support C++17. 2019-10-23 21:14:33 +08:00
KmolYuan c4928f7c94 Update version. 2019-10-21 23:52:05 +08:00
KmolYuan 9d1b9e7e43 Move enums to Python script to reduce library size. 2019-10-15 16:13:16 +08:00
KmolYuan 6e4de28045 Update git ignore. 2019-10-15 14:43:17 +08:00
KmolYuan 4ac257e3f5 Update version. 2019-10-12 12:29:01 +08:00
KmolYuan 675aa76d5c Support PEP 561. 2019-10-12 12:26:29 +08:00
KmolYuan 2da3e6bf80 Change type hint of magic method. 2019-10-10 15:44:59 +08:00
KmolYuan 8952591dbd Allow reusing "set_compiler" command. 2019-10-08 22:06:04 +08:00
KmolYuan bd616e898d Add MSVC CI builder. 2019-10-08 21:28:00 +08:00
KmolYuan de609637d1 Update version. 2019-10-06 18:12:06 +08:00
KmolYuan 6497133e1a Apply build config for unix. 2019-10-06 18:08:46 +08:00
KmolYuan 18c05748fc Support MSVC compiler. 2019-10-06 17:49:53 +08:00
KmolYuan 8cfb613344 Update classifiers of supported Python version. 2019-09-29 19:37:14 +08:00
KmolYuan b49366b820 Format setup script. 2019-09-27 21:23:07 +08:00
KmolYuan 88d828546c Reduce the source files of Solvespace. 2019-09-27 14:18:22 +08:00
KmolYuan 989008e3e9 Fix the distribution from sources. 2019-09-27 09:20:30 +08:00
KmolYuan 4f034441c2 Fix requirements.txt missing in source. 2019-09-26 22:21:07 +08:00
KmolYuan a022604e16 Update more information. 2019-09-25 18:32:27 +08:00
KmolYuan b76206afc6 Update version. 2019-09-25 18:04:25 +08:00
KmolYuan 40d4c37bda Remove *.whl artifact. 2019-09-25 16:09:09 +08:00
KmolYuan 8c4a37ef4c Fix deploy script covered. 2019-09-25 15:59:41 +08:00
KmolYuan 495a285c7e Fix PyPI deployment. 2019-09-24 23:10:02 +08:00
KmolYuan bc674db3d3 Merge branch 'python' of https://github.com/KmolYuan/solvespace into python 2019-09-24 14:02:55 +08:00
KmolYuan 67a87605db Fix PyPI readme format. 2019-09-23 23:29:16 +08:00
KmolYuan 0b2cfc4201 Update badges. 2019-09-23 21:23:03 +08:00
KmolYuan da23826f19 Add Windows build. 2019-09-23 21:06:58 +08:00
KmolYuan d9abfe3d52 Add Windows build. 2019-09-23 16:48:18 +08:00
KmolYuan cfe0c75f30 Update deployment config. 2019-09-23 12:55:51 +08:00
KmolYuan c05df29b3b Adjust CI config as matrix. 2019-09-20 16:58:10 +08:00
KmolYuan 813217bf00 Merge branch 'master' into python 2019-09-20 15:14:15 +08:00
Yuan e9e0fd6cfe
Merge pull request #1 from solvespace/master
Update from original master.
2019-09-20 15:12:59 +08:00
phkahler 5d78f993ce Make helix origin create a line even if it's in a different group.
Helix should always make a line for the axis.
2019-09-20 01:09:58 +00:00
phkahler 162897eca7 Reimplement DivPivoting as DivProjected.
The old implementation was an approximation, whereas the new one is exact.
2019-09-20 01:09:25 +00:00