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 b5ad50abfd
commit 44af3629db
9 changed files with 488 additions and 57 deletions

View File

@@ -89,6 +89,7 @@ void AbstractSplitView::setupSettings()
OnChange(*hGrp,"UseBackgroundColorMid");
OnChange(*hGrp,"UseAntialiasing");
OnChange(*hGrp,"ShowFPS");
OnChange(*hGrp,"useVBO");
OnChange(*hGrp,"Orthographic");
OnChange(*hGrp,"HeadlightColor");
OnChange(*hGrp,"HeadlightDirection");
@@ -226,7 +227,13 @@ void AbstractSplitView::OnChange(ParameterGrp::SubjectType &rCaller,ParameterGrp
else if (strcmp(Reason,"ShowFPS") == 0) {
for (std::vector<View3DInventorViewer*>::iterator it = _viewer.begin(); it != _viewer.end(); ++it)
(*it)->setEnabledFPSCounter(rGrp.GetBool("ShowFPS",false));
puts("updating FPS 1");
}
else if (strcmp(Reason,"useVBO") == 0) {
for (std::vector<View3DInventorViewer*>::iterator it = _viewer.begin(); it != _viewer.end(); ++it)
(*it)->setEnableduseVBO(rGrp.GetBool("useVBO",false));
}
else if (strcmp(Reason,"Orthographic") == 0) {
// check whether a perspective or orthogrphic camera should be set
if (rGrp.GetBool("Orthographic", true)) {