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

best way to replace GDI+ code with hardware acceleration?

P: n/a
PJ6
I would like to see my application's graphics running full-screen
(1920x1200), and GDI+ just doesn't cut it aesthetically since it's neither
hardware accelerated, nor efficiently implemented.

It's not really clear to me, what should I use that will me the most
accesible to machines to run? I don't want to require Vista, the 3.5
Framework (I won't touch WPF anyway), or otherwise anything that is not
likely to be already installed. For instance, I don't have DirectX 10
installed on my development machine and since it's XP it never will be.

So I think that leaves me with D3D, OpenGL, and DirectX .. 7,8,9? Or maybe
there is another way, like a managed wrapper to something more primitive
than GDI+?

I'm not having any luck as to how to proceed. I'm just looking for the
simplest and most compatable way to render in 2D to a WinForms application
using hardware acceleration. Any suggestions?

Paul
Oct 25 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a
To be honest, you're restricting your choices quite severely if you won't
touch WPF. Your best bet is an older DirectX or OpenGL, and I believe there
is a managed OpenGL library freely available, but there's no guarantee your
target machine will have it installed. That sort of restricts you to
DirectX 9 in that case.

Regardless, you're going to face a large degree of work rewriting your front
end to take advantage of a hardware accelerated library, so why not just
invest that time into WPF? The extra layer of abstraction means its more
likely to run without running into problems of missing libraries (a machine
either has 3.5SP1 installed or it doesn't) and I'd wager you'll find it a
good deal easier to start coding vectored XAML animations than if you were
using DirectDraw for 2D graphics.

Not to mention the skillset you learn should be future-proofed for a bit
longer and would be more broadly useful to you.
"PJ6" <no***@nowhere.netwrote in message
news:Oo**************@TK2MSFTNGP04.phx.gbl...
>I would like to see my application's graphics running full-screen
(1920x1200), and GDI+ just doesn't cut it aesthetically since it's neither
hardware accelerated, nor efficiently implemented.

It's not really clear to me, what should I use that will me the most
accesible to machines to run? I don't want to require Vista, the 3.5
Framework (I won't touch WPF anyway), or otherwise anything that is not
likely to be already installed. For instance, I don't have DirectX 10
installed on my development machine and since it's XP it never will be.

So I think that leaves me with D3D, OpenGL, and DirectX .. 7,8,9? Or maybe
there is another way, like a managed wrapper to something more primitive
than GDI+?

I'm not having any luck as to how to proceed. I'm just looking for the
simplest and most compatable way to render in 2D to a WinForms application
using hardware acceleration. Any suggestions?

Paul

Oct 31 '08 #2

P: n/a
PJ6
My application runs on a scheduler-based physics engine, object positions
and rendering information come from polling the object collection with time
as a parameter so I'm not really 'animating', per-se.

I thought WPF was only hardware accelerated for Vista, but now that I look
at it again I see that that's not true, there is simply a problem with my
laptop's graphics chipset, Intel says it supports Pixel Shader 2.0, but
apparently users widely complain that it doesn't.

I also completely dismissed WPF as a joke the first time I saw it because of
the markup-based designer.

Anyway... thanks, you do have a point. I will look at WPF again.

Paul

"Alex Clark" <qu****@noemail.noemailwrote in message
news:eQ**************@TK2MSFTNGP06.phx.gbl...
To be honest, you're restricting your choices quite severely if you won't
touch WPF. Your best bet is an older DirectX or OpenGL, and I believe
there is a managed OpenGL library freely available, but there's no
guarantee your target machine will have it installed. That sort of
restricts you to DirectX 9 in that case.

Regardless, you're going to face a large degree of work rewriting your
front end to take advantage of a hardware accelerated library, so why not
just invest that time into WPF? The extra layer of abstraction means its
more likely to run without running into problems of missing libraries (a
machine either has 3.5SP1 installed or it doesn't) and I'd wager you'll
find it a good deal easier to start coding vectored XAML animations than
if you were using DirectDraw for 2D graphics.

Not to mention the skillset you learn should be future-proofed for a bit
longer and would be more broadly useful to you.

Nov 2 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.