Fixed the full sample anti-aliasing support in Freestyle.

The render pipeline has been extended to better work with
Freestyle stroke rendering.  Struct Render has a new member
ListBase freestyle_renders to keep Render instances generated
through stroke rendering in Freestyle.  The number of
elements (LinkData instances with LinkData::data pointing to a
Render instance) in freestyle_renders is the same as the scene
render layers of the scene being rendered.  When the k-th scene
render layer has the Freestyle option enabled, the k-th element
of freestyle_renders refers to a Render instance that holds
Freestyle render results for the scene layer.  This association
between the scene render layer and the Render instance is used to
merge the Freestyle render results into the corresponding render
results for the scene render layer.
This commit is contained in:
2010-03-28 17:46:10 +00:00
parent 009d7819c1
commit 840ba8e8e7
8 changed files with 137 additions and 60 deletions

View File

@@ -676,8 +676,13 @@ void Controller::DrawStrokes()
resetModified();
}
void Controller::ResetRenderCount()
{
_render_count = 0;
}
Render* Controller::RenderStrokes(Render *re) {
BlenderStrokeRenderer* blenderRenderer = new BlenderStrokeRenderer(re);
BlenderStrokeRenderer* blenderRenderer = new BlenderStrokeRenderer(re, ++_render_count);
_Canvas->Render( blenderRenderer );
Render* freestyle_render = blenderRenderer->RenderScene(re);
delete blenderRenderer;