Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime Curioni <maxime.curioni@gmail.com>2008-12-02 00:30:44 +0300
committerMaxime Curioni <maxime.curioni@gmail.com>2008-12-02 00:30:44 +0300
commit89e8fa216f2c1d8b2f8dc311aa471c1373ca2d40 (patch)
treea26c958480b83019a597e7c95134dbf60e77ace7 /source/blender/freestyle/FRS_freestyle.h
parent17555efed7583c12459d4f3044dfdd457489ab39 (diff)
The GL-based renderer was removed. Freestyle now uses Blender's internal renderer to raster strokes.
The render generated from Freestyle's data is currently stored in the original scene's render structure ( as 'freestyle_render'): when the render database is generated, the scene's geometrical data is first imported into Freestyle and strokes are calculated. The generated strokes are used to create a Blender scene, rendered independently. The render result is used in the rendering loop. The final rendering is performed the same way edge rendering is, in a function ('freestyle_enhance_add') operating on each individual render part. Freestyle strokes are only included if the toggle button "Freestyle" (in the 'Output' panel) is active and if the "Freestyle" render layer is also selected. Freestyle's panel appears when the toggle button 'Freestyle' is active. IMPORTANT: as of now, rendering ONLY works when OSA is disabled and when Xparts = Yparts = 1. If these settings are not set, a bogus image will be created. To make the render happen, many modifications had to be made: - the Canvas::Draw and Operators::create methods no longer render strokes. They only generate shading and locational information. - a BlenderStrokeRenderer class was added to turn Freestyle's strokes into a Blender scene. Basically, the scene consists of strokes in their projected image 2D coordinates and an orthographic camera centered in the middle of the corresponding canvas. The scene is rendered using vertex colors, in shadeless mode (therefore, no lamp is needed). BlenderStrokeRenderer uses the old GLTextureManager to load textures (as required by the StrokeRenderer class), even though stroke textures are probably not supported (not tested). After the scene is rendered, it is safely and automatically discarded. - AppCanvas' code was greatly reduced to the bare minimum. The former AppCanvas would use an OpenGL-based back buffer and z buffer to determine the scene's color and depth information. In the future, this data will be determined from the corresponding render passes. Currently, the integration is not achieved so all style modules using depth/color information are sure to fail. - before, Freestyle needed an OpenGL context to determine the camera's information and to compute the view map. As of now, the modelview and projection matrices are fully determined using data provided by Blender. This means both perspective and orthographic projections are supported. The AppGLWidget will very soon be removed completely.
Diffstat (limited to 'source/blender/freestyle/FRS_freestyle.h')
-rw-r--r--source/blender/freestyle/FRS_freestyle.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/freestyle/FRS_freestyle.h b/source/blender/freestyle/FRS_freestyle.h
index 09672ae14fd..42ca18b7351 100644
--- a/source/blender/freestyle/FRS_freestyle.h
+++ b/source/blender/freestyle/FRS_freestyle.h
@@ -13,9 +13,14 @@ extern "C" {
extern float freestyle_sphere_radius;
extern float freestyle_dkr_epsilon;
+ extern float freestyle_viewpoint[3];
+ extern float freestyle_mv[4][4];
+ extern float freestyle_proj[4][4];
+ extern int freestyle_viewport[4];
+
void FRS_initialize();
void FRS_prepare(Render* re);
- void FRS_render_GL(Render* re);
+ void FRS_render_Blender(Render* re);
#ifdef __cplusplus
}