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
This commit is contained in:
Jean-Marie Verdun
2017-02-05 21:10:57 +01:00
committed by wmayer
parent b9e8b4f74f
commit 8383f7222f
9 changed files with 488 additions and 57 deletions

View File

@@ -324,8 +324,8 @@ ViewProviderPartExt::~ViewProviderPartExt()
void ViewProviderPartExt::onChanged(const App::Property* prop)
{
Part::Feature* feature = dynamic_cast<Part::Feature*>(pcObject);
Part::Feature* feature = dynamic_cast<Part::Feature*>(pcObject);
if (prop == &Deviation) {
if(Visibility.getValue() && feature && !feature->Shape.getValue().IsNull())
updateVisual(feature->Shape.getValue());
@@ -799,6 +799,8 @@ void ViewProviderPartExt::reload()
void ViewProviderPartExt::updateData(const App::Property* prop)
{
// vejmarie: Force VBO update of the part
this->faceset->update_vbo=1;
if (prop->getTypeId() == Part::PropertyPartShape::getClassTypeId()) {
// get the shape to show
const TopoDS_Shape &cShape = static_cast<const Part::PropertyPartShape*>(prop)->getValue();