== Find the bottleneck ==
 
== Find the bottleneck ==
If your application is running slower than you'd hoped - then you need to establish which of these four things is the biggest problem.
+
If your application is running slower than you'd hoped - then you need to establish which of these four things is the biggest problem. However, since drawing fewer polygons will also reduce the number of pixels you're filling, it's essential to do these tests one at a time in the order I describe:
   −
=== GPU Pixel processing ===
+
=== First test GPU Pixel processing ===
 
Pixel processing time is easy to understand - reduce the size of the window you're rendering to (keeping everything else the same). If your program goes faster in rough proportion to the area of the window (height x width) - then pixel processing is the bottleneck.
 
Pixel processing time is easy to understand - reduce the size of the window you're rendering to (keeping everything else the same). If your program goes faster in rough proportion to the area of the window (height x width) - then pixel processing is the bottleneck.
    
=== CPU processing ===
 
=== CPU processing ===