diff options
author | Ton Roosendaal <ton@blender.org> | 2004-09-29 14:49:19 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2004-09-29 14:49:19 +0400 |
commit | ceb7d3db464377ac86e9ae92c8bd4a9ee09ddec2 (patch) | |
tree | b77584b832f48ae8c1467fff7977d3b7783b6845 /source/blender/src/mywindow.c | |
parent | 01e6d69ff5db756a529ebb912a3aa6861d213221 (diff) |
Two fixes;
- borderselect draws cleaner info in bottom/left corner window
- OGL render (in view3d header) option didn't work on successive renders.
was due to removing hack that reopened the window each time. But now it
needed to be assigned correctly to blender's 'mywindow' system.
Diffstat (limited to 'source/blender/src/mywindow.c')
-rw-r--r-- | source/blender/src/mywindow.c | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/source/blender/src/mywindow.c b/source/blender/src/mywindow.c index 9071d5e919d..d92e8c16409 100644 --- a/source/blender/src/mywindow.c +++ b/source/blender/src/mywindow.c @@ -114,16 +114,27 @@ void mywindow_init_mainwin(Window *win, int orx, int ory, int sizex, int sizey) } } -/* XXXXXXXXXXXXXXXX very hacky, not allowed to release again after 2.24 - * again after 2.24 +/* XXXXXXXXXXXXXXXX very hacky, because of blenderwindows vs ghostwindows vs renderwindow + this routine sets up a blenderwin (a mywin) */ -void mywindow_build_and_set_renderwin(void) +void mywindow_build_and_set_renderwin( int orx, int ory, int sizex, int sizey) { + + swinarray[2]= &renderwindow; + + renderwindow.xmin= orx; + renderwindow.ymin= ory; + renderwindow.xmax= orx+sizex-1; + renderwindow.ymax= ory+sizey-1; + renderwindow.qevents= NULL; + + myortho2(-0.5, (float)sizex-0.5, -0.5, (float)sizey-0.5); + glLoadIdentity(); + glGetFloatv(GL_PROJECTION_MATRIX, (float *)renderwindow.winmat); glGetFloatv(GL_MODELVIEW_MATRIX, (float *)renderwindow.viewmat); - swinarray[2]= &renderwindow; - renderwindow.qevents= NULL; + mywinset(2); curswin= 2; } @@ -318,8 +329,7 @@ void mywinset(int wid) printf("mywinset %d: doesn't exist\n", wid); return; } - - if (wid == 1) { /* main window */ + if (wid == 1 || wid == 2) { /* main window or renderwindow*/ glViewport(0, 0, ( win->xmax-win->xmin)+1, ( win->ymax-win->ymin)+1); glScissor(0, 0, ( win->xmax-win->xmin)+1, ( win->ymax-win->ymin)+1); } |