This is a preliminary specification. Nothing is set in stone, libraries can change and project can be scrapped.
The goal for this project is to replace the rendering algorithm in Coin3d, from OpenGL 3.0 to BGFX to allow modern rendering backends while retaining the API as closely as possible.
This will allow FreeCAD and other coin based applications to remain as close to unchanged as possible while being updated for modern rendering backends.
The project is with FreeCAD in mind but we should avoid making it FreeCAD only so it can be merged with upstream if the coin maintainers so chooses.
The reason to have a freecad fork instead of working directly with upstream is to speed up the development of this functionality as it has become a bottle neck for further 3D improvements.
- Study realthunder's BGFX renderer and see how that work was done
- Investigate if it is possible to use BGFX forced to OpenGL and still use OpenGL calls manually - if this works, then we will be able to use this port in freecad while we work on it.
Github - coin:
- Create a FreeCAD/coin Fork
- BGFX work is done in a bgfx branch
Github - quarter:
- Create a FreeCAD/coin Fork
- Apply existing FreeCAD source tree patches to this repository
- BGFX work is done in a bgfx branch
FreeCAD Project adjustments for BGFX:
- Add Coin3D as a submodule in FreeCAD
- Add build chain option to use coin as submodule
- Add BGFX as a dependency
FreeCAD Project adjustments for Quarter:
- Add quarter as a submodule in FreeCAD
- Modify build chain to use submodule
- Remove source tree quarter
- Use BGFX instead of OpenGL for rendering
- Until port is done, BGFX should default to OpenGL rendering to be able to use old rendering nodes.
- Implementation should be made gradually and focus on issues we have in FreeCAD such as line width and patterns.
- Focus should also be on porting the code rather than adding new features
- Use libraries instead of reinventing the wheel but make sure licenses are compatible.
- Reducing dependencies are good, but this can wait until we have a finished port.