<joseph_>
teepee kintel: I've been tracing the rendering code and have consolidated some questions that will guide my refactoring. I'll send them below.
<joseph_>
1. I'm a little unclear on the overall purpose/effect of the ENABLE_OPENCSG macro. If it's disabled, then most of OpenCSGRenderer is not implemented.
<joseph_>
2. CGALRenderer handles a lot of data types for the input geometry. Is there a source summarizing when all of these are encountered? It can get confusing because there could be a PolySet, or multiple types of polyhedrons: CGAL_Nef, OGL, or OGL_VBO. Plus, 2D and 3D are rendered differently. I might need to figure this out on my own from the code that's there, because it seems to have been written by obliviand.
fling has quit [Ping timeout: 240 seconds]
fling has joined #openscad
<joseph_>
3. How does the following top-level proposal sound? Two new classes are created called something like PreviewRenderer and FinalRenderer, as drop-in replacements for OpenCSGRenderer and CGALRenderer, respectively. I would move all the existing VBO rendering code into the new classes, leaving only the fixed-function calls behind in OpenCSGRenderer and CGALRenderer. Then the process of choosing legacy or modern OpenGL will just be a
<joseph_>
matter of changing which class is instantiated (and for the time being this could happen at runtime). A preprocessor macro called something like DISABLE_LEGACY_RENDERING could fully deactivate OpenCSGRenderer and CGALRenderer, allowing the use of newer OpenGL versions in the future.
niyawe has quit [Quit: No Ping reply in 180 seconds.]
Digit has quit [Remote host closed the connection]
Digit has joined #openscad
niyawe has joined #openscad
GNUmoon2 has quit [Remote host closed the connection]
GNUmoon has joined #openscad
<peeps[zen]>
joseph_: regarding ENABLE_OPENCSG, most dependencies have a way to disable in the build process, so for example you could create a headless version which only spits out stl etc. and no graphics capabilities
<peeps[zen]>
it allows for greater flexibility of use-cases. like I'm pretty sure the recent WASM projects aren't including it