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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2007-12-01 22:29:50 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2007-12-01 22:29:50 +0300
commiteff09ae3966575b139402607387f75b0120fad51 (patch)
treeefc6f854716234559f357d414fb682e1a3d7bff7 /source/blender/src/drawview.c
parentf06872d493dec309c963908e0079b454f4e38110 (diff)
For the OpenGL render option in the 3d view, if a camera is active,
it now sets the viewport exactly the same as if rendering.
Diffstat (limited to 'source/blender/src/drawview.c')
-rw-r--r--source/blender/src/drawview.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/source/blender/src/drawview.c b/source/blender/src/drawview.c
index bfccd0b77ff..a02f1065b5b 100644
--- a/source/blender/src/drawview.c
+++ b/source/blender/src/drawview.c
@@ -3090,22 +3090,25 @@ void drawview3dspace(ScrArea *sa, void *spacedata)
}
-void drawview3d_render(struct View3D *v3d, int winx, int winy)
+void drawview3d_render(struct View3D *v3d, int winx, int winy, float winmat[][4])
{
Base *base;
Scene *sce;
- float winmat[4][4];
-
- update_for_newframe_muted(); /* first, since camera can be animated */
-
- setwinmatrixview3d(winx, winy, NULL);
+ float v3dwinmat[4][4];
setviewmatrixview3d();
myloadmatrix(v3d->viewmat);
+
+ /* when winmat is not NULL, it overrides the regular window matrix */
glMatrixMode(GL_PROJECTION);
- mygetmatrix(winmat);
+ if(winmat)
+ myloadmatrix(winmat);
+ else
+ setwinmatrixview3d(winx, winy, NULL);
+ mygetmatrix(v3dwinmat);
glMatrixMode(GL_MODELVIEW);
- Mat4MulMat4(v3d->persmat, v3d->viewmat, winmat);
+
+ Mat4MulMat4(v3d->persmat, v3d->viewmat, v3dwinmat);
Mat4Invert(v3d->persinv, v3d->persmat);
Mat4Invert(v3d->viewinv, v3d->viewmat);