Orange bug: forgot to restore inverse matrix calculus for OpengGL render

in a window... didn't know what it was for, but now I do! It uses the
inverse to do pre-clipping on objects.
This commit is contained in:
Ton Roosendaal 2006-01-24 17:07:39 +00:00
parent 26b718654d
commit 9a20e5466c
4 changed files with 28 additions and 21 deletions

@ -216,7 +216,7 @@ static int node_buts_rgb(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *bu
{
if(block) {
bNodeSocket *sock= node->outputs.first; /* first socket stores value */
if(sock) {
/* enforce square box drawing */
uiBlockSetEmboss(block, UI_EMBOSSP);
@ -233,6 +233,7 @@ static int node_buts_rgb(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *bu
uiBlockSetEmboss(block, UI_EMBOSS);
}
}
return 30 + (int)(node->width-NODE_DY);
}

@ -2389,6 +2389,7 @@ void drawview3d_render(struct View3D *v3d, int winx, int winy)
{
Base *base;
Scene *setscene;
float winmat[4][4];
update_for_newframe_muted(); /* first, since camera can be animated */
@ -2396,9 +2397,12 @@ void drawview3d_render(struct View3D *v3d, int winx, int winy)
setviewmatrixview3d();
myloadmatrix(v3d->viewmat);
// Mat4MulMat4(v3d->persmat, v3d->viewmat, winmat);
// Mat4Invert(v3d->persinv, v3d->persmat);
// Mat4Invert(v3d->viewinv, v3d->viewmat);
glMatrixMode(GL_PROJECTION);
mygetmatrix(winmat);
glMatrixMode(GL_MODELVIEW);
Mat4MulMat4(v3d->persmat, v3d->viewmat, winmat);
Mat4Invert(v3d->persinv, v3d->persmat);
Mat4Invert(v3d->viewinv, v3d->viewmat);
free_all_realtime_images();
reshadeall_displist();

@ -1129,7 +1129,7 @@ static void node_add_menu(SpaceNode *snode)
}
else if(snode->treetype==NTREE_COMPOSIT) {
/* compo menu, still hardcoded defines... solve */
event= pupmenu("Add Node%t|Output%x201|Render Result %x221|Image %x220|RGB Curves%x209|AlphaOver %x210|Blur %x211|Filter %x212|Value %x203|Color %x202|Mix %x204|ColorRamp %x205|Color to BW %x206|Normal %x207");
event= pupmenu("Add Node%t|Output%x201|Render Output%x202|Render Result %x221|Image %x220|RGB Curves%x209|AlphaOver %x210|Blur %x211|Filter %x212|Value %x203|Color %x202|Mix %x204|ColorRamp %x205|Color to BW %x206|Normal %x207");
if(event<1) return;
}
else return;

@ -1051,6 +1051,7 @@ void BIF_do_ogl_render(View3D *v3d, int anim)
if(anim) {
bMovieHandle *mh= BKE_get_movie_handle(G.scene->r.imtype);
int cfrao= CFRA;
mh->start_movie(&G.scene->r, winx, winy);
@ -1063,6 +1064,7 @@ void BIF_do_ogl_render(View3D *v3d, int anim)
if(test_break()) break;
}
mh->end_movie();
CFRA= cfrao;
}
else {
drawview3d_render(v3d, winx, winy);