473,414 Members | 1,615 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

Faster than GDI+ ?



Hi,

I wrote an application that draw on a form complex graphics. Tons of
image with transparencies. I used GDI+ of course... but they are so
slow! The paint event takes about 250 ms... I need to refresh the screen
about five times faster.

What might I use else? DirectX ?

I need only to draw, rotate and translate bitmap with alpha channel.

Bye
Marco / iw2nzm

Mar 22 '07 #1
6 4367
"Marco Trapanese" <ma******************@libero.itschrieb:
I wrote an application that draw on a form complex graphics. Tons of image
with transparencies. I used GDI+ of course... but they are so slow! The
paint event takes about 250 ms... I need to refresh the screen about five
times faster.
Note that GDI+ is (other than GDI and DirectX) not hardware-accelerated.
That's why it is so slow compared to technologies which make use of hardware
acceleration.
What might I use else? DirectX ?
Yes, for example.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Mar 22 '07 #2
On Thu, 22 Mar 2007 17:12:05 +0100, Herfried K. Wagner [MVP] wrote:
"Marco Trapanese" <ma******************@libero.itschrieb:
>I wrote an application that draw on a form complex graphics. Tons of image
with transparencies. I used GDI+ of course... but they are so slow! The
paint event takes about 250 ms... I need to refresh the screen about five
times faster.

Note that GDI+ is (other than GDI and DirectX) not hardware-accelerated.
That's why it is so slow compared to technologies which make use of hardware
acceleration.
>What might I use else? DirectX ?

Yes, for example.
Or OpenGL for that matter...
--
Bits.Bytes
http://bytes.thinkersroom.com
Mar 22 '07 #3
Rad [Visual C# MVP] wrote:
>>What might I use else? DirectX ?
Yes, for example.

Or OpenGL for that matter...
I don't know DirectX neither OpenGl :)
Is it simple to convert the GDI+ code into one of these?

What is the difference (in two words...) between DX and OGL?

Thanks
Marco / iw2nzm
Mar 22 '07 #4
Marco Trapanese wrote:
What is the difference (in two words...) between DX and OGL?
DX is a Windows-specific API written by Microsoft.

OpenGL is a cross-platform open API written by Silicon Graphics.

DX is probably harder to learn than OpenGL, but once you've got the hang of
them and worked your way around how each one works, they're fairly
comparable in terms of ease of use.

DX is probably easier to interact with than OpenGL from VB.NET as it has
managed interface DLLs provided with Visual Studio -- but I've never used
either from VB (only from C++) so others may be better able to provide
information on this point.

DX also covers lots of additional functions than graphics, such as sound and
music, networking, input devices, etc. If you go with OpenGL you will need
to find alternative libraries to offer this functionality (although I
appreciate these probably aren't relevant for your requirements).

There's a fairly detailed comparison here:

http://en.wikipedia.org/wiki/Compari...t3D_and_OpenGL

--

(O)enone
Mar 22 '07 #5
I wrote an application that draw on a form complex graphics. Tons of image
with transparencies. I used GDI+ of course... but they are so slow! The
paint event takes about 250 ms... I need to refresh the screen about five
times faster.

What might I use else? DirectX ?

I need only to draw, rotate and translate bitmap with alpha channel.
You might want to look at WPF in the .Net 3.0 update. A simple test app
was 3x faster doing jpeg loading compared to the stock 2.0 image libraries.
It is layered on top of DirectX so hardware acceleration is possible.

The WPF API is a lot more VB friendly, as opposed to DirectX which
requires some C++ style thinking (error codes, allocating and cleaning up
resources, etc). There are not as many online references yet..

Mar 24 '07 #6
Robert wrote:
You might want to look at WPF in the .Net 3.0 update. A simple test app
was 3x faster doing jpeg loading compared to the stock 2.0 image libraries.
It is layered on top of DirectX so hardware acceleration is possible.

The WPF API is a lot more VB friendly, as opposed to DirectX which
requires some C++ style thinking (error codes, allocating and cleaning up
resources, etc). There are not as many online references yet..

Thanks for the advice.

Marco / iw2nzm
Mar 24 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: **ham | last post by:
I know that's an old dirty issue; GDI+ almost -the slowest part of the framework - has bothered many developers using it in animations. Even in managed C++ the performance is awful. Now, any dude...
15
by: ham-z | last post by:
I have written the following Win app in VB.NET 2003 . The class is simply picture boxes that behave in a random order after they have been instantiated and added to a form. When I create 15 or more...
6
by: Scatropolis | last post by:
Is GDI as fast as drawing gets? I'm writing a program that deals with drawing a ridiculous amount of lines and am finding GDI a little slow, or just maybe how I'm using it. I was looking at some...
6
by: James dean | last post by:
I want a good site that will show clearly how much more functionality GDI+ has. I cannot seem to find anything other than sites that list "some" of the new functionality that GDI+ offers. A...
0
by: Brian Keating | last post by:
hi there i've a test program that creates a treeview and destroys it over and over, i keep track of the gdi object count for the process and see if they are ok. However when i switch on...
7
by: chad | last post by:
is it just me or does anybody else find the Image.RotateFlip method kind of slow? (I'm comparing to commercial softwares). Same for resizing. I'm using sourceImage =...
7
by: Marcin Rzeznicki | last post by:
Hello, Do you think it is legitimate practice to mix GDI+ and GDI calls (via Get/ReleaseHDC()) in paint event of a control? I've heard there is possibility of performance loss while "locking"...
6
by: Martijn Mulder | last post by:
/* BitBlt.cs C# code using P/Invoke I have good reasons to use P/Invoke to get access to the Win32 API function BitBlt(). But I have trouble understanding the workings of it. Below is a...
5
by: Jonathan Boivin | last post by:
Hi, I've got some problems with loading bills using a bill usercontrol I built. If I load all current bills in my test environment (156) everything is fine once, but repeating the operation...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.