diff options
author | Daniel Dunbar <daniel@zuster.org> | 2004-01-08 23:08:27 +0300 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2004-01-08 23:08:27 +0300 |
commit | 32a96642bdbd196f6bc670b956e2d7d2a5c0b36b (patch) | |
tree | 0935b197679538bc3bc7913badd5a25b715e0b2a /source/blender/src/toets.c | |
parent | eb6ef538e95835332cfd6da6b030160565bcc02b (diff) |
- added displist option to 10-timer (ctrl-alt-t), runs makedisplist
on current option (for timing subsurf stuff).
Diffstat (limited to 'source/blender/src/toets.c')
-rw-r--r-- | source/blender/src/toets.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/source/blender/src/toets.c b/source/blender/src/toets.c index a88c6ca7a0e..87f2654e8c6 100644 --- a/source/blender/src/toets.c +++ b/source/blender/src/toets.c @@ -865,24 +865,32 @@ int blenderqread(unsigned short event, short val) } else if(G.qual==(LR_ALTKEY|LR_CTRLKEY)) { int a; - int event= pupmenu("10 Timer%t|draw|draw+swap"); + int event= pupmenu("10 Timer%t|draw|draw+swap|displist"); if(event>0) { double stime= PIL_check_seconds_timer(); char tmpstr[128]; int time; - printf("start timer\n"); waitcursor(1); - + for(a=0; a<10; a++) { - scrarea_do_windraw(curarea); - if(event==2) screen_swapbuffers(); + if (event==1) { + scrarea_do_windraw(curarea); + } else if (event==2) { + scrarea_do_windraw(curarea); + screen_swapbuffers(); + } else if (event==3) { + if (OBACT) { + makeDispList(OBACT); + } + } } time= (PIL_check_seconds_timer()-stime)*1000; - if(event==1) sprintf(tmpstr, "draw %%t|%d", time); - if(event==2) sprintf(tmpstr, "d+sw %%t|%d", time); + if(event==1) sprintf(tmpstr, "draw %%t|%d ms", time); + if(event==2) sprintf(tmpstr, "d+sw %%t|%d ms", time); + if(event==3) sprintf(tmpstr, "displist %%t|%d ms", time); waitcursor(0); pupmenu(tmpstr); |