Commit Graph

40 Commits

Author SHA1 Message Date
wmayer
983939b32d Coverity: Uninitialized scalar/pointer field 2020-07-20 17:34:30 +02:00
wmayer
2453a50aba Coverity: Structurally/Logically dead code 2020-07-20 17:34:28 +02:00
wmayer
709c349fa7 [skip ci] avoid to redefine GL_GLEXT_PROTOTYPES if already defined 2020-06-12 14:07:45 +02:00
Zheng, Lei
7e4969f329 Gui: fix screentshot 2020-01-14 15:59:38 +01:00
Zheng, Lei
12965165a6 Gui: fix screenshot 2020-01-12 18:50:37 +01:00
Zheng, Lei
927bec9e96 Part: reduce memory usage in SoBrepFaceSet
Can we further reduce it to num_triangles = num_indices/4*3?
2019-11-21 11:58:44 +01:00
Zheng, Lei
bb3baefdb5 Gui: refactor bounding box selection style
Previously, box style selection is rendered using customized
SoBoxSelectionRenderAction, which does not support selection context,
i.e. it does not work with Link.

This patch implements context aware bound box rendering inside
SoFCSelectionRoot, SoFCSelection and SoFCPathAnnotation (for always on
top rendering). The box rendering in SoBoxSelectionRenderAction is
disabled on construction. Box style selection can be enabled for
individual object through property SelectionStyle (moved from
ViewProviderGeometryObject to ViewProviderDocumentObject), or globally
through Parameter BaseApp/Preferences/View/ShowSelectionBoundingBox.

In addition, the parameter BaseApp/Preferences/View/UseNewSelection is
used to override selection model reported from
ViewProvider::useNewSelectionModel(). The reason being that, the same
parameter is already used to toggle selection model inside
SoFCSelection. This avoids inconsistency of selection model choice
between view provider and the SoFCSelection node inside. Note that if
the parameter 'UseNewSelection' is set to false, those view providers
that choose old selection model will not work with Link.
2019-10-08 09:56:09 +02:00
wmayer
e48c52c480 force strict ISO C++ (-Wpedantic)
for Drawing, Image, Inspection, Mesh, MeshPart, Part, Path, Points, Raytracing, ReverseEngineering, Spreadsheet, Start, Surface, Web

TODO: fix several -Woverflow in area
2019-09-18 11:32:42 +02:00
Zheng, Lei
b78761cf3c Part: fix VBO update on multiple gl context
Multiple OpenGL context is caused by linking some shape object from
external documents. The VBO update must be triggered for all contexts.
2019-08-30 14:55:14 +02:00
luz.paz
b869b6e29e Fix typos in various src/Mod directories 2019-08-17 15:32:49 +02:00
Zheng, Lei
c9ba972d26 Gui: add support of selection context
The patch implements context-aware selection and rendering in 3D view.

Please check [here](https://git.io/fjiY5) for more details, including
the following 'Render Caching' section.

The patch also includes modification of View3DInventorViewer to support
always-on-top selection rendering using the secondary selection context
and the new coin node SoFCPathAnnotation.

Another small change in SoQtQuarterAdaptor for more responsive frame
rate display. The original implementation reports skewed frame rate
in the presence of long idle period.
2019-08-17 14:52:10 +02:00
Abdullah Tahiri
7ea21c84c3 PCH: Part GUI 2019-05-03 23:15:25 +02:00
wmayer
5ff6945577 fix compiler warnings with py3 and msvc 2018-04-16 18:24:53 +02:00
wmayer
00037b4d6c fix -Wsign-compare 2017-06-19 12:50:55 +02:00
Jean-Marie Verdun
b9ba167d92 Accelerate VBO rendering (bareleye model goes from about 18fps to 34fps on a Macbook Pro)
Fix crashes related to VBO buffer expansion by reallocating the buffers when needed
2017-06-19 12:40:04 +02:00
wmayer
f001c3e16b fix crash when Part model changes with VBO activated 2017-05-16 06:03:22 +02:00
wmayer
f8a14fc69e Qt5OpenGL: release context when finished 2017-03-21 20:37:03 +01:00
wmayer
0bb1fe3f3d render full selection of huge part models in real time 2017-03-20 20:36:31 +01:00
wmayer
efe7599ae2 fallback handling if in VBO rendering no normals are set 2017-03-06 19:18:47 +01:00
wmayer
67a7f97abc move VBO rendering code into its own method 2017-03-06 18:36:11 +01:00
wmayer
7d536947a9 support of highlighting and selection if shading is disabled 2017-03-06 09:29:26 +01:00
wmayer
67fc7130cf fix various warnings 2017-02-21 22:51:26 +01:00
Jean-Marie Verdun
ff595e0b27 Fix Face color display issue with Vbo turned on 2017-02-20 18:54:07 +01:00
wmayer
778e6f6e48 use Coin API to deal with vbo and add methods to cleanup GL resources on destruction 2017-02-20 13:16:30 +01:00
wmayer
5ef6f8ba15 move vbo handling to private class 2017-02-19 19:40:37 +01:00
wmayer
34df08e1b7 fix rendering problems by using the cache context 2017-02-12 14:41:55 +01:00
wmayer
c2f1bab784 implement correct way to query VBO status of viewer from SoBRepFaceSet node 2017-02-12 14:41:55 +01:00
wmayer
a48282071a make vboAvailable a static variable and extend interface of renderShape to avoid side effects 2017-02-12 14:41:55 +01:00
wmayer
fe15db6af3 write custom action class to notify shape node about vbo changes 2017-02-12 14:41:55 +01:00
wmayer
4a0720dd00 cleanup experimental code, improve whitespaces 2017-02-12 14:41:55 +01:00
wmayer
9da4da0ecd get VBO support for SoBrepFaceSet working on Windows 2017-02-12 14:41:55 +01:00
Jean-Marie Verdun
44af3629db Accelerate 3D rendering with VBO support
*First step to move Part rendering using VBO instead of direct rendering
*Update comments inside the code
*Assume VBO is available if OpenGL > 3.0 is detected
*Add initial Color support to VBO rendering !
*Initial full feature VBO rendering implementation
*Modify some include issue for linux build
*Try to fix linux include header
*Reupdate header include for linux support
*Fix compilation on linux
*Fix linux and MacoOS build
*Fix glGetString definition
*Fix Windows build
*Add VBO support as an option into the Preference menu
*Fix crash while running FreeCAD test bench with new VBO rendering infrastructure (in both cases)
*Improve performances
*Compute material index only when a VBO update is required (improve frame rate by 10%)
*Clean the code
*Fix Travis compilation warning
*Try to fix Windows compilation issue
*Update include for Windows
2017-02-12 14:41:55 +01:00
Stefan Tröger
19344f7f01 fix blocking datum plane
BrepFaceSet implementation was faulty, if normal cache locks have been aquired they need to be released
2016-04-12 18:12:04 +02:00
Mateusz Skowroński
6942c23895 Qt4's qglobal.h defined TRUE and FALSE. Qt5 does not do it anymore. Replace it with true and false.
158f39ec78

This change is Qt4/Qt5 neutral.
2016-01-05 16:43:33 +01:00
wmayer
96611d0a71 + correctly handle toggle selection in BRep shape nodes 2015-11-28 16:21:20 +01:00
wmayer
5b08fa453b + add security checks to SoBrep nodes 2015-10-07 23:08:03 +02:00
wwmayer
6bf065c097 + fix many minor warnings, activate -Wall for gcc 2015-08-02 22:32:18 +02:00
wmayer
00d92f7646 + fixes #0001363: VRML export can produce corrupt files 2014-12-02 15:40:36 +01:00
wmayer
2ca282b0c5 + Split SoBrepShape into three files 2013-11-09 13:16:42 +01:00
wmayer
97d6d8c38c #0001093: Improvements for Brep Inventor nodes (disabled atm) 2013-06-15 23:07:26 +02:00