diff options
author | Ton Roosendaal <ton@blender.org> | 2009-04-20 15:39:18 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2009-04-20 15:39:18 +0400 |
commit | bc061594311b5444e34bb14e47a12b7467046f67 (patch) | |
tree | bd9d1f7e4d8c9e070cdb9124a25b332b56a8efed /source/blender/windowmanager/intern/wm_subwindow.c | |
parent | 4b45c57bb6fe974f30e62a226a587a4db4c17375 (diff) |
2.5
Fixes:
- HSV picker didn't work. Old option "No Hilite" for buttons made it not
being checked for input anymore. Needs to be on attention list!
- Node editor wasn't drawing buttons correctly. Two things to keep track
off:
- Use wmLoadIdentity(), not glLoadIdentity()
- I've added a wmPushMatrix() and wmPopMatrix() version for correct
wm-compatible push/pop. Only one level for now.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_subwindow.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_subwindow.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_subwindow.c b/source/blender/windowmanager/intern/wm_subwindow.c index 54074ec8f07..67ba31b84c0 100644 --- a/source/blender/windowmanager/intern/wm_subwindow.c +++ b/source/blender/windowmanager/intern/wm_subwindow.c @@ -68,6 +68,7 @@ typedef struct wmSubWindow { int swinid; float viewmat[4][4], winmat[4][4]; + float viewmat1[4][4], winmat1[4][4]; } wmSubWindow; @@ -306,6 +307,28 @@ void wmMultMatrix(float mat[][4]) glGetFloatv(GL_MODELVIEW_MATRIX, (float *)_curswin->winmat); } +void wmPushMatrix(void) +{ + if(_curswin==NULL) return; + + Mat4CpyMat4(_curswin->viewmat1, _curswin->viewmat); + Mat4CpyMat4(_curswin->winmat1, _curswin->winmat); +} + +void wmPopMatrix(void) +{ + if(_curswin==NULL) return; + + Mat4CpyMat4(_curswin->viewmat, _curswin->viewmat1); + Mat4CpyMat4(_curswin->winmat, _curswin->winmat1); + + glMatrixMode(GL_PROJECTION); + glLoadMatrixf(&_curswin->winmat[0][0]); + glMatrixMode(GL_MODELVIEW); + glLoadMatrixf(&_curswin->viewmat[0][0]); + +} + void wmGetSingleMatrix(float mat[][4]) { if(_curswin) |