diff options
author | Ton Roosendaal <ton@blender.org> | 2004-10-03 17:49:54 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2004-10-03 17:49:54 +0400 |
commit | 3a840670a52701e8690a5d201bcb57eac45e2c8a (patch) | |
tree | 0341f7c09a337d8d43d0fca51376314476ac2905 /source/blender/src/screendump.c | |
parent | 6e4b9ad96b3894e432a1561d1902f656aaa799c0 (diff) |
Lots of small changes, all for UI in Blender;
----- Killed UI frontbuffer draw
The interface toolkit was drawing all live updates (while using menus/buttons)
in the frontbuffer. This isn't well supported cross-platform, so time to be
killed once. Now it uses *only* glReadPixels and glCopyPixels for frontbuffer
access.
Live updates or menus now are drawn in backbuffer always, and copied to
front when needed.
NOTE: it was tested, but needs thorough review! On PC systems I suspects
backbuffer selection to screw up (check!). On SGI/SUN workstations it
should work smooth; but I need evidence
----- Smaller fixes;
- AA fonts were garbled on ATI systems. Now the AA fonts are drawn exact
on pixel positions. Needs the new FTGL libb too, patch is on maillist
- Rounded theme uses antialiased outlines
- Pulldown and popup menus have nice softshadow now
- New button type 'PULLDOWN', thats the one that callsup a pulldown menu.
Should be added to themes, as is the full menu/pulldown drawing
- Screendump for 1 window does the full window now, including header
- Empty pulldowns (for example running blender without scripts) give no
drawing error anymore
For review & fun;
- added curved lines as connectors, for Oops window
Diffstat (limited to 'source/blender/src/screendump.c')
-rw-r--r-- | source/blender/src/screendump.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/source/blender/src/screendump.c b/source/blender/src/screendump.c index 00cce259954..0cb032620ed 100644 --- a/source/blender/src/screendump.c +++ b/source/blender/src/screendump.c @@ -143,10 +143,14 @@ void BIF_screendump(int fscreen) } else { { /* a window */ - int win= mywinget(); - - bwin_getsuborigin(win, &x, &y); - bwin_getsize(win, &dumpsx, &dumpsy); + //int win= mywinget(); + + //bwin_getsuborigin(win, &x, &y); + //bwin_getsize(win, &dumpsx, &dumpsy); + x= curarea->totrct.xmin; + y= curarea->totrct.ymin; + dumpsx= curarea->totrct.xmax-x; + dumpsy= curarea->totrct.ymax-y; } } @@ -155,6 +159,8 @@ void BIF_screendump(int fscreen) dumprect= MEM_mallocN(sizeof(int)*dumpsx*dumpsy, "dumprect"); glReadBuffer(GL_FRONT); glReadPixels(x, y, dumpsx, dumpsy, GL_RGBA, GL_UNSIGNED_BYTE, dumprect); + glFinish(); + glReadBuffer(GL_BACK); if(UIbuttip==NULL) { wasmenu= 0; |