Faster than GDI+ ?

M

Marco Trapanese

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
 
H

Herfried K. Wagner [MVP]

Marco Trapanese said:
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.
 
R

Rad [Visual C# MVP]

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.


Yes, for example.

Or OpenGL for that matter...
 
M

Marco Trapanese

Rad said:
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
 
O

\(O\)enone

Marco said:
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/Comparison_of_Direct3D_and_OpenGL
 
R

Robert

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..
 
M

Marco Trapanese

Robert said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Improve DrawImage 1
Problems with GDI objects 5
DirectX: Do I need this? 3
GDI+ bitmap buffer access 0
Drag and drop problem 2
C#) How to keep drawing graphics by GDI 11
Faster than GDI+ 6
Help regarding DirectX 3

Top