I completed last post’s work by optimizing the rendering process (directly copying the back buffer into the RenderResult object instead of manually copying the information). I am sure that is a good performance improvement.
I also understood why the first render had its color inverted: I first noticed that the result was only showing the object silhouette, while it should have also shown the object (as it is selected by default in the viewer’s configuration). I then remembered that Stéphane had mentioned that the rendering process is made of two steps, building the strokes and rendering, and I then looked at what that “rendering” function could be. I came to understand that the
Controller::DrawStrokes() method is the one responsible for building up the strokes, while the final result is obtained by the
AppGLWidget::draw() method. Combining both methods resolved the issue.
Here is the corrected render result that should be obtained:
I am happy to note that from this revision on (rev 15047), we have a rendering foundation to base the remaining work on. Even though it is now limited to a static scene, I consider that the hardest challenges of the first phase have been resolved. I am also delighted that the project is on schedule and going forward. Getting tangible results is a big motivation boost and I am going to continue to bring the project further. Right now, I am going to slow down on the features and make sure that it compiles well on Linux and Windows. If all goes well, I should meet the June 8th deadline for finishing the first phase.