By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,707 Members | 1,636 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,707 IT Pros & Developers. It's quick & easy.

Faster than GDI+ ?

P: n/a


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
Share this Question
Share on Google+
6 Replies


P: n/a
"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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.