# drawing multiple objects on screen efficiently?

**URL:** <https://psychtoolbox.discourse.group/t/drawing-multiple-objects-on-screen-efficiently/2017>\
**Category:** Uncategorized\
**Created:** [October 13, 2008, 10:41pm UTC](https://psychtoolbox.discourse.group/t/drawing-multiple-objects-on-screen-efficiently/2017 "2008-10-13T22:41:09Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![tao.gao](https://avatars.discourse-cdn.com/v4/letter/t/47e85d/32.png) [@tao.gao](https://psychtoolbox.discourse.group/u/tao.gao)\
**Post date:** [October 13, 2008, 10:41pm UTC](https://psychtoolbox.discourse.group/t/drawing-multiple-objects-on-screen-efficiently/2017/1 "2008-10-13T22:41:09Z")

</div>

HI,  
  
I'm a beginner of psychotoolbox. In my multiple-object-tracking  
experiment, I need to draw multiple squares on the screen and make  
them move smoothly on every frame (for a demo, please see  
[http://www.yale.edu/perception/Brian/demos/MOT-Basics.html)](http://www.yale.edu/perception/Brian/demos/MOT-Basics.html)).   
  
Currently, I'm using the 'Screen('FillRect') ...)' function to draw  
squares. It works pretty good when the number of squares is smaller  
than 12. However, when the number of objects exceeds 12, the displays  
slow down and are not smooth any more. It seems that within the  
duration of a single frame (less than 20 ms), matlab on my computer  
can not finish drawing more than 12 objects.   
  
I'm wondering if there is any way to conquer this limitation. For  
instance, instead of drawing 12 new squares during every frame,let  
matlab draws 12 objects off-line and just put them into different  
spatial locations. However, as a beginner of psychotoolbox, I can not  
solve this problem myself. It will be great if someone around here can  
give me some suggestions.   
  
Thanks in advance!  
  
Tao

---

<div class="post-metadata">

**Author:** ![anblick](https://avatars.discourse-cdn.com/v4/letter/a/48db29/32.png) [@anblick](https://psychtoolbox.discourse.group/u/anblick)\
**Post date:** [October 13, 2008, 11:37pm UTC](https://psychtoolbox.discourse.group/t/drawing-multiple-objects-on-screen-efficiently/2017/2 "2008-10-13T23:37:00Z")

</div>

The drawing functions accept lists as arguments, and with one   
functional call you can quickly draw multiple objects. See the help   
to the FillRect function, i.e. Screen('FillRect?')  
  
keith  
  

> On Oct 13, 2008, at 6:41 PM, tao.gao wrote:  
>    
> \> HI,  
> \>  
> \> I'm a beginner of psychotoolbox. In my multiple-object-tracking  
> \> experiment, I need to draw multiple squares on the screen and make  
> \> them move smoothly on every frame (for a demo, please see  
> \> [http://www.yale.edu/perception/Brian/demos/MOT-Basics.html)](http://www.yale.edu/perception/Brian/demos/MOT-Basics.html)).  
> \>  
> \> Currently, I'm using the 'Screen('FillRect') ...)' function to draw  
> \> squares. It works pretty good when the number of squares is smaller  
> \> than 12. However, when the number of objects exceeds 12, the displays  
> \> slow down and are not smooth any more. It seems that within the  
> \> duration of a single frame (less than 20 ms), matlab on my computer  
> \> can not finish drawing more than 12 objects.  
> \>  
> \> I'm wondering if there is any way to conquer this limitation. For  
> \> instance, instead of drawing 12 new squares during every frame,let  
> \> matlab draws 12 objects off-line and just put them into different  
> \> spatial locations. However, as a beginner of psychotoolbox, I can not  
> \> solve this problem myself. It will be great if someone around here can  
> \> give me some suggestions.  
> \>  
> \> Thanks in advance!  
> \>  
> \> Tao  
> \>  
> \>  
> \>  
> \> ------------------------------------  
> \>  
> \> Post your message to: [psychtoolbox@yahoogroups.com](mailto:psychtoolbox@yahoogroups.com)  
> \> Please indicate OS9, OSX, or WIN version, and include your full name.  
> \> Denis Pelli, David Brainard, and Allen Ingling.  
> \> [http://psychtoolbox.org](http://psychtoolbox.org)  
> \> Yahoo! Groups Links  
> \>  
> \>  
> \>  
> \>

---

<div class="post-metadata">

**Author:** ![mariokleiner](https://avatars.discourse-cdn.com/v4/letter/m/13edae/32.png) [@mariokleiner](https://psychtoolbox.discourse.group/u/mariokleiner)\
**Post date:** [October 14, 2008, 7:37pm UTC](https://psychtoolbox.discourse.group/t/drawing-multiple-objects-on-screen-efficiently/2017/3 "2008-10-14T19:37:49Z")

</div>

Keith proposal is demonstrated in DrawingSpeedTest.  
  
However, even without that, drawing 12 objects shouldn't  
take more than some 12 \* 40 microseconds \< 0.5 msecs,  
even on very slow, old hardware.  
  
Overhead of Matlab on a modern system is less  
than 10 microseconds per call.  
  
Are you sure you have proper graphics drivers  
installed? Are there any warnings output?  
  
-mario  
  

> --- In [psychtoolbox@yahoogroups.com](mailto:psychtoolbox@yahoogroups.com), Keith Schneider \<ks@...\> wrote:  
> \>  
> \> The drawing functions accept lists as arguments, and with one   
> \> functional call you can quickly draw multiple objects. See the help   
> \> to the FillRect function, i.e. Screen('FillRect?')  
> \>   
> \> keith  
> \>   
> \> On Oct 13, 2008, at 6:41 PM, tao.gao wrote:  
> \>   
> \> \> HI,  
> \> \>  
> \> \> I'm a beginner of psychotoolbox. In my multiple-object-tracking  
> \> \> experiment, I need to draw multiple squares on the screen and make  
> \> \> them move smoothly on every frame (for a demo, please see  
> \> \> [http://www.yale.edu/perception/Brian/demos/MOT-Basics.html)](http://www.yale.edu/perception/Brian/demos/MOT-Basics.html)).  
> \> \>  
> \> \> Currently, I'm using the 'Screen('FillRect') ...)' function to draw  
> \> \> squares. It works pretty good when the number of squares is smaller  
> \> \> than 12. However, when the number of objects exceeds 12, the displays  
> \> \> slow down and are not smooth any more. It seems that within the  
> \> \> duration of a single frame (less than 20 ms), matlab on my computer  
> \> \> can not finish drawing more than 12 objects.  
> \> \>  
> \> \> I'm wondering if there is any way to conquer this limitation. For  
> \> \> instance, instead of drawing 12 new squares during every frame,let  
> \> \> matlab draws 12 objects off-line and just put them into different  
> \> \> spatial locations. However, as a beginner of psychotoolbox, I can not  
> \> \> solve this problem myself. It will be great if someone around here can  
> \> \> give me some suggestions.  
> \> \>  
> \> \> Thanks in advance!  
> \> \>  
> \> \> Tao  
> \> \>  
> \> \>  
> \> \>  
> \> \> ------------------------------------  
> \> \>  
> \> \> Post your message to: [psychtoolbox@yahoogroups.com](mailto:psychtoolbox@yahoogroups.com)  
> \> \> Please indicate OS9, OSX, or WIN version, and include your full name.  
> \> \> Denis Pelli, David Brainard, and Allen Ingling.  
> \> \> [http://psychtoolbox.org](http://psychtoolbox.org)  
> \> \> Yahoo! Groups Links  
> \> \>  
> \> \>  
> \> \>  
> \> \>  
> \>

---

<div class="post-metadata">

**Author:** ![tao.gao](https://avatars.discourse-cdn.com/v4/letter/t/47e85d/32.png) [@tao.gao](https://psychtoolbox.discourse.group/u/tao.gao)\
**Post date:** [October 24, 2008, 12:30am UTC](https://psychtoolbox.discourse.group/t/drawing-multiple-objects-on-screen-efficiently/2017/4 "2008-10-24T00:30:27Z")

</div>

Hi,  
  
Thanks very much for Mario and Keith's replies. I had played around  
with the screen function during the last few days. In my code code,  
when drawing 12 squares during a single frame, I called ' screen  
('FrameSquare') ' 12 times. Now, following Keith's suggestion, I put  
all the squares in an array and only call the screen function once.  
The speed of drawing is significantly increased! Thanks a lot.  
  
However, I do have a new question. In my following experiment, I need  
to draw multiple irregular polygons on the screen. The screen function  
I'm using now is 'screen('FillPoly'..)'. As drawing multiple squares,  
I tried to put all the polygons into an array and draw them by calling  
the screen function only once. I have tried several different ways to  
put the vertexes of multiple polygons into an array. However, the  
'FillPoly' functions seems can not read these vertexes.   
  
Is there anyone can give some suggestions on how to increase the  
efficiency of the 'FillPoly' function?   
  
Thanks in advance.  
  
Cheers  
Tao  
  
P.S. Mario, I'm pretty sure that my video card is OK and my code works  
the same way on several different PCs. So it is unlikely to be a  
hardware problem, unless there are some tips about how to use the  
video card appropriately that I do not know.  
  
  
--- In [psychtoolbox@yahoogroups.com](mailto:psychtoolbox@yahoogroups.com), "Mario Kleiner"  
\<mario.kleiner@...\> wrote:  

> \>  
> \> Keith proposal is demonstrated in DrawingSpeedTest.  
> \>   
> \> However, even without that, drawing 12 objects shouldn't  
> \> take more than some 12 \* 40 microseconds \< 0.5 msecs,  
> \> even on very slow, old hardware.  
> \>   
> \> Overhead of Matlab on a modern system is less  
> \> than 10 microseconds per call.  
> \>   
> \> Are you sure you have proper graphics drivers  
> \> installed? Are there any warnings output?  
> \>   
> \> -mario  
> \>   
> \> --- In [psychtoolbox@yahoogroups.com](mailto:psychtoolbox@yahoogroups.com), Keith Schneider \<ks@\> wrote:  
> \> \>  
> \> \> The drawing functions accept lists as arguments, and with one   
> \> \> functional call you can quickly draw multiple objects. See the help   
> \> \> to the FillRect function, i.e. Screen('FillRect?')  
> \> \>   
> \> \> keith  
> \> \>   
> \> \> On Oct 13, 2008, at 6:41 PM, tao.gao wrote:  
> \> \>   
> \> \> \> HI,  
> \> \> \>  
> \> \> \> I'm a beginner of psychotoolbox. In my multiple-object-tracking  
> \> \> \> experiment, I need to draw multiple squares on the screen and make  
> \> \> \> them move smoothly on every frame (for a demo, please see  
> \> \> \> [http://www.yale.edu/perception/Brian/demos/MOT-Basics.html)](http://www.yale.edu/perception/Brian/demos/MOT-Basics.html)).  
> \> \> \>  
> \> \> \> Currently, I'm using the 'Screen('FillRect') ...)' function to draw  
> \> \> \> squares. It works pretty good when the number of squares is smaller  
> \> \> \> than 12. However, when the number of objects exceeds 12, the

displays  

> \> \> \> slow down and are not smooth any more. It seems that within the  
> \> \> \> duration of a single frame (less than 20 ms), matlab on my computer  
> \> \> \> can not finish drawing more than 12 objects.  
> \> \> \>  
> \> \> \> I'm wondering if there is any way to conquer this limitation. For  
> \> \> \> instance, instead of drawing 12 new squares during every frame,let  
> \> \> \> matlab draws 12 objects off-line and just put them into different  
> \> \> \> spatial locations. However, as a beginner of psychotoolbox, I

can not  

> \> \> \> solve this problem myself. It will be great if someone around

here can  

> \> \> \> give me some suggestions.  
> \> \> \>  
> \> \> \> Thanks in advance!  
> \> \> \>  
> \> \> \> Tao  
> \> \> \>  
> \> \> \>  
> \> \> \>  
> \> \> \> ------------------------------------  
> \> \> \>  
> \> \> \> Post your message to: [psychtoolbox@yahoogroups.com](mailto:psychtoolbox@yahoogroups.com)  
> \> \> \> Please indicate OS9, OSX, or WIN version, and include your full

name.  

> \> \> \> Denis Pelli, David Brainard, and Allen Ingling.  
> \> \> \> [http://psychtoolbox.org](http://psychtoolbox.org)  
> \> \> \> Yahoo! Groups Links  
> \> \> \>  
> \> \> \>  
> \> \> \>  
> \> \> \>  
> \> \>  
> \>

---

<div class="post-metadata">

**Author:** ![mariokleiner](https://avatars.discourse-cdn.com/v4/letter/m/13edae/32.png) [@mariokleiner](https://psychtoolbox.discourse.group/u/mariokleiner)\
**Post date:** [October 26, 2008, 3:18pm UTC](https://psychtoolbox.discourse.group/t/drawing-multiple-objects-on-screen-efficiently/2017/5 "2008-10-26T15:18:11Z")

</div>

Hi again,  
  

> \> The speed of drawing is significantly increased! Thanks a lot.

If you run the DrawingSpeedTest([],[],1) benchmark, it will  
tell you how many microseconds it took per rectangle to  
draw. If your system works correctly, you should see around  
2 microseconds per drawn rectangle on about 3 years old  
hardware. If you see something much more than that,  
something is wrong.  
  
The line ...  
"PTB-INFO: OpenGL-Renderer is XXXX ...."  
should say something like "ATI Technologies Inc." or  
"NVidia corporation" etc. If it says something like  
"Microsoft software renderer..." you can be sure that  
you don't have the graphics drivers properly set up or  
installed and the system is just using a slow software  
renderer.  
  
What is the output of DrawingSpeedTest([],[],1)?  
  

> \> Is there anyone can give some suggestions on how to increase the  
> \> efficiency of the 'FillPoly' function?

'FillPoly' only accepts one polygon per call. But if  
your system is set up properly, that shouldn't be  
a big problem.  
  
The only other explanation for low performance would  
be that you have very old or unsuitable graphics hardware  
installed.  
  
-mario

---

<div class="post-metadata">

**Author:** ![tao.gao](https://avatars.discourse-cdn.com/v4/letter/t/47e85d/32.png) [@tao.gao](https://psychtoolbox.discourse.group/u/tao.gao)\
**Post date:** [October 31, 2008, 1:23pm UTC](https://psychtoolbox.discourse.group/t/drawing-multiple-objects-on-screen-efficiently/2017/6 "2008-10-31T13:23:49Z")

</div>

Hi,Mario  
  
Thanks very much for your suggestions. Here is the outcome from  
DrawingSpeedTest([],[],1):   
  
  
PTB-INFO: Using NVidia's GL\_TEXTURE\_RECTANGLE\_NV extension for  
efficient high-performance texture mapping...  
Rendered 1000 frames, each with 800 rectangles of size 80 x 80.  
Total time 3.283449 seconds. Time per rectangle 0.004104 msecs.  
  
It seems that the feedback are pretty good. Could you let me know  
where I could find the code of DrawingSpeedTest？I hope to go through  
it but failed to find a file named `DrawingSpeedTest'.  
  
Thanks a lot!  
  
Cheers  
Tao  
  
  
  
--- In [psychtoolbox@yahoogroups.com](mailto:psychtoolbox@yahoogroups.com), "Mario Kleiner"  
\<mario.kleiner@...\> wrote:  

> \>  
> \> Hi again,  
> \>   
> \> \> The speed of drawing is significantly increased! Thanks a lot.  
> \>   
> \> If you run the DrawingSpeedTest([],[],1) benchmark, it will  
> \> tell you how many microseconds it took per rectangle to  
> \> draw. If your system works correctly, you should see around  
> \> 2 microseconds per drawn rectangle on about 3 years old  
> \> hardware. If you see something much more than that,  
> \> something is wrong.  
> \>   
> \> The line ...  
> \> "PTB-INFO: OpenGL-Renderer is XXXX ...."  
> \> should say something like "ATI Technologies Inc." or  
> \> "NVidia corporation" etc. If it says something like  
> \> "Microsoft software renderer..." you can be sure that  
> \> you don't have the graphics drivers properly set up or  
> \> installed and the system is just using a slow software  
> \> renderer.  
> \>   
> \> What is the output of DrawingSpeedTest([],[],1)?  
> \>   
> \> \> Is there anyone can give some suggestions on how to increase the  
> \> \> efficiency of the 'FillPoly' function?   
> \>   
> \> 'FillPoly' only accepts one polygon per call. But if  
> \> your system is set up properly, that shouldn't be  
> \> a big problem.  
> \>   
> \> The only other explanation for low performance would  
> \> be that you have very old or unsuitable graphics hardware  
> \> installed.  
> \>   
> \> -mario  
> \>

---

<div class="post-metadata">

**Author:** ![Allen\_Ingling](https://avatars.discourse-cdn.com/v4/letter/a/a183cd/32.png) [@Allen\_Ingling](https://psychtoolbox.discourse.group/u/Allen_Ingling)\
**Post date:** [October 31, 2008, 1:28pm UTC](https://psychtoolbox.discourse.group/t/drawing-multiple-objects-on-screen-efficiently/2017/7 "2008-10-31T13:28:40Z")

</div>

To find the code just type  
 which('DrawingSpeedTest')  
at the Matlab command line. A useful, although dangerous if you are not   
careful elaboration of this idea is  
 edit(which('DrawingSpeedTest'))  
that immediate opens the file in an editor (where, if you are not careful,   
you can make changes and overwrite the original source!).  
  
Ted Wright  
  

> On Fri, 31 Oct 2008, tao.gao wrote:  
>    
> \> Hi,Mario  
> \>  
> \> Thanks very much for your suggestions. Here is the outcome from  
> \> DrawingSpeedTest([],[],1):  
> \>  
> \>  
> \> PTB-INFO: Using NVidia's GL\_TEXTURE\_RECTANGLE\_NV extension for  
> \> efficient high-performance texture mapping...  
> \> Rendered 1000 frames, each with 800 rectangles of size 80 x 80.  
> \> Total time 3.283449 seconds. Time per rectangle 0.004104 msecs.  
> \>  
> \> It seems that the feedback are pretty good. Could you let me know  
> \> where I could find the code of DrawingSpeedTest？I hope to go through  
> \> it but failed to find a file named `DrawingSpeedTest'.  
> \>  
> \> Thanks a lot!  
> \>  
> \> Cheers  
> \> Tao  
> \>  
> \>  
> \>  
> \> --- In [psychtoolbox@yahoogroups.com](mailto:psychtoolbox@yahoogroups.com), "Mario Kleiner"  
> \> \<mario.kleiner@...\> wrote:  
> \>\>  
> \>\> Hi again,  
> \>\>  
> \>\>\> The speed of drawing is significantly increased! Thanks a lot.  
> \>\>  
> \>\> If you run the DrawingSpeedTest([],[],1) benchmark, it will  
> \>\> tell you how many microseconds it took per rectangle to  
> \>\> draw. If your system works correctly, you should see around  
> \>\> 2 microseconds per drawn rectangle on about 3 years old  
> \>\> hardware. If you see something much more than that,  
> \>\> something is wrong.  
> \>\>  
> \>\> The line ...  
> \>\> "PTB-INFO: OpenGL-Renderer is XXXX ...."  
> \>\> should say something like "ATI Technologies Inc." or  
> \>\> "NVidia corporation" etc. If it says something like  
> \>\> "Microsoft software renderer..." you can be sure that  
> \>\> you don't have the graphics drivers properly set up or  
> \>\> installed and the system is just using a slow software  
> \>\> renderer.  
> \>\>  
> \>\> What is the output of DrawingSpeedTest([],[],1)?  
> \>\>  
> \>\>\> Is there anyone can give some suggestions on how to increase the  
> \>\>\> efficiency of the 'FillPoly' function?  
> \>\>  
> \>\> 'FillPoly' only accepts one polygon per call. But if  
> \>\> your system is set up properly, that shouldn't be  
> \>\> a big problem.  
> \>\>  
> \>\> The only other explanation for low performance would  
> \>\> be that you have very old or unsuitable graphics hardware  
> \>\> installed.  
> \>\>  
> \>\> -mario  
> \>\>  
> \>  
> \>  
> \>  
> \>  
>    
> --   
> This message has been scanned for viruses and  
> dangerous content by MailScanner, and is  
> believed to be clean.

---

<div class="post-metadata">

**Author:** ![tao.gao](https://avatars.discourse-cdn.com/v4/letter/t/47e85d/32.png) [@tao.gao](https://psychtoolbox.discourse.group/u/tao.gao)\
**Post date:** [October 31, 2008, 4:46pm UTC](https://psychtoolbox.discourse.group/t/drawing-multiple-objects-on-screen-efficiently/2017/8 "2008-10-31T16:46:56Z")

</div>

Hi,   
  
Thanks for your help. Now I have went through code of  
DrawingSPeedTest. It seems to me that this code draws multiple objects  
by assigning them into an array and then calls the screen function  
once to draw all of them. In this way, multiple objects can be  
generated with pretty good efficiency.   
  
Unfortunately, as I mentioned in my previous email, this method only  
works for FillRect, FrameRect, FillOval and FrameOval. To draw  
multiple irregular polygons (which is critical to my experiment), one  
still needs to call the screen function multiple times.  
  
Is there anyway to improve the speed of the 'FillPoly' function? For  
example, calling the screen function once to draw multiple polygons?   
  
Thanks a lot.  
  
Tao  
  
  
P.S. I have already tested the speed of my computer with the  
"DrawingSPeedTest", and the feedback is pretty good. Here is the  
feedback. Still, I can not draw 12 polygons smoothly on each frame by  
calling the screen function 12 times per frame.  
  
 PTB-INFO: Using NVidia's GL\_TEXTURE\_RECTANGLE\_NV extension for  
 efficient high-performance texture mapping...  
 Rendered 1000 frames, each with 800 rectangles of size 80 x 80.  
 Total time 3.283449 seconds. Time per rectangle 0.004104 msecs.  
  
  
  
  
  
--- In [psychtoolbox@yahoogroups.com](mailto:psychtoolbox@yahoogroups.com), "Charles E. (Ted) Wright"  
\<cewright@...\> wrote:  

> \>  
> \> To find the code just type  
> \> which('DrawingSpeedTest')  
> \> at the Matlab command line. A useful, although dangerous if you are not   
> \> careful elaboration of this idea is  
> \> edit(which('DrawingSpeedTest'))  
> \> that immediate opens the file in an editor (where, if you are not

careful,   

> \> you can make changes and overwrite the original source!).  
> \>   
> \> Ted Wright  
> \>   
> \> On Fri, 31 Oct 2008, tao.gao wrote:  
> \>   
> \> \> Hi,Mario  
> \> \>  
> \> \> Thanks very much for your suggestions. Here is the outcome from  
> \> \> DrawingSpeedTest([],[],1):  
> \> \>  
> \> \>  
> \> \> PTB-INFO: Using NVidia's GL\_TEXTURE\_RECTANGLE\_NV extension for  
> \> \> efficient high-performance texture mapping...  
> \> \> Rendered 1000 frames, each with 800 rectangles of size 80 x 80.  
> \> \> Total time 3.283449 seconds. Time per rectangle 0.004104 msecs.  
> \> \>  
> \> \> It seems that the feedback are pretty good. Could you let me know  
> \> \> where I could find the code of DrawingSpeedTest？I hope to

go through  

> \> \> it but failed to find a file named `DrawingSpeedTest'.  
> \> \>  
> \> \> Thanks a lot!  
> \> \>  
> \> \> Cheers  
> \> \> Tao  
> \> \>  
> \> \>  
> \> \>  
> \> \> --- In [psychtoolbox@yahoogroups.com](mailto:psychtoolbox@yahoogroups.com), "Mario Kleiner"  
> \> \> \<mario.kleiner@\> wrote:  
> \> \>\>  
> \> \>\> Hi again,  
> \> \>\>  
> \> \>\>\> The speed of drawing is significantly increased! Thanks a lot.  
> \> \>\>  
> \> \>\> If you run the DrawingSpeedTest([],[],1) benchmark, it will  
> \> \>\> tell you how many microseconds it took per rectangle to  
> \> \>\> draw. If your system works correctly, you should see around  
> \> \>\> 2 microseconds per drawn rectangle on about 3 years old  
> \> \>\> hardware. If you see something much more than that,  
> \> \>\> something is wrong.  
> \> \>\>  
> \> \>\> The line ...  
> \> \>\> "PTB-INFO: OpenGL-Renderer is XXXX ...."  
> \> \>\> should say something like "ATI Technologies Inc." or  
> \> \>\> "NVidia corporation" etc. If it says something like  
> \> \>\> "Microsoft software renderer..." you can be sure that  
> \> \>\> you don't have the graphics drivers properly set up or  
> \> \>\> installed and the system is just using a slow software  
> \> \>\> renderer.  
> \> \>\>  
> \> \>\> What is the output of DrawingSpeedTest([],[],1)?  
> \> \>\>  
> \> \>\>\> Is there anyone can give some suggestions on how to increase the  
> \> \>\>\> efficiency of the 'FillPoly' function?  
> \> \>\>  
> \> \>\> 'FillPoly' only accepts one polygon per call. But if  
> \> \>\> your system is set up properly, that shouldn't be  
> \> \>\> a big problem.  
> \> \>\>  
> \> \>\> The only other explanation for low performance would  
> \> \>\> be that you have very old or unsuitable graphics hardware  
> \> \>\> installed.  
> \> \>\>  
> \> \>\> -mario  
> \> \>\>  
> \> \>  
> \> \>  
> \> \>  
> \> \>  
> \>   
> \> --   
> \> This message has been scanned for viruses and  
> \> dangerous content by MailScanner, and is  
> \> believed to be clean.  
> \>
