Ways to speed up drawing?
Ways to speed up drawing?
Ways to speed up drawing?
Ways to speed up drawing?
Ways to speed up drawing?
Ways to speed up drawing? Ways to speed up drawing? Ways to speed up drawing? Ways to speed up drawing? Ways to speed up drawing? Ways to speed up drawing? Ways to speed up drawing? Ways to speed up drawing?
Ways to speed up drawing? Ways to speed up drawing?
Ways to speed up drawing?
Go Back  Xtreme Visual Basic Talk > > > Ways to speed up drawing?


Reply
 
Thread Tools Display Modes
  #1  
Old 06-09-2013, 05:21 AM
pampam686 pampam686 is offline
Freshman
 
Join Date: Nov 2010
Posts: 33
Default Ways to speed up drawing?


what are the common practices/techniques to speed up drawing GDI?

can you paint in multiple threads?

i am running at 1920 x1080 resolution and drawing images of these sizes give me a max fps of 24-25. help. thnx
Reply With Quote
  #2  
Old 06-10-2013, 12:31 PM
passel's Avatar
passelWays to speed up drawing? passel is offline
Sinecure Expert

Super Moderator
* Guru *
 
Join Date: Jun 2003
Location: Upstate New York, usa
Posts: 8,026
Default

Of course a standard answer would be not to use GDI+ since it isn't meant for rapid game type drawing, but if you want to speed up GDI+ the answers can be quite involved and subjective.
My personal testing of GDI+ methods of drawing have led me to conclude that using texture brushes and the BufferedGraphics class gave the best boost to sprite type, i.e. arcade style games within the limits of GDI+.
On the other hand, if you were doing a lot of pixel manipulation, such as a paint application, or computer aided design (cad), or simulating fireworks, or fractals, etc... processing pixels values in a memory array and rendering from there would probably be the quickest approach.
As for your second question, I did do some experiments with two threads rendering a number of items in two different backbuffers, but found that total number of items that could be rendered per second did not go up. It appears that even if two thread are using two different graphic objects to write into two different backbuffers, that the GDI+ calls themselves might be serialized to some extent, at least within a given process, so that the net result was the same or less than doing all the rendering in one thread. I assume that if you had a large amount of calculation to be done in relation to the drawing, then there could be a substantial gain with those two tasks being separated into two threads.
One series of experiments with GDI+ drawing can be found in the first 12 posts of this thread.
It starts off fairly traditionally, drawing from the Paint event, but quickly moves to using the BufferedGraphics object and texture brushes to increase drawing speed, and backbuffer "flipping" speed.
__________________
There Is An Island Of Opportunity In The Middle of Every Difficulty.
Miss That, Though, And You're Pretty Much Doomed.
Reply With Quote
  #3  
Old 07-16-2013, 01:38 PM
ephestion ephestion is offline
Newcomer
 
Join Date: Aug 2006
Posts: 10
Default

The only thing that slows down VB .Net from what I seem to observe is somekind of bottleneck based on the VB.Net system. A very large loop or several conditionals can slow down code considerably.

A Loop in C (non .Net) is many times faster than Visual C++ or C# and especially better than VB.Net.The actual drawing component of the system.Graphics object is a low level API Wrapper. VB.Net works well with API or in built managed code. The only problem I have noticed is that even if the underlying code be it API or Managed COde, th eend result is that VB.Net is slawer
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Ways to speed up drawing?
Ways to speed up drawing?
Ways to speed up drawing? Ways to speed up drawing?
Ways to speed up drawing?
Ways to speed up drawing?
Ways to speed up drawing? Ways to speed up drawing? Ways to speed up drawing? Ways to speed up drawing? Ways to speed up drawing? Ways to speed up drawing? Ways to speed up drawing?
Ways to speed up drawing?
Ways to speed up drawing?
 
Ways to speed up drawing?
Ways to speed up drawing?
 
-->