473,386 Members | 1,820 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,386 software developers and data experts.

best way to replace GDI+ code with hardware acceleration?

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
2 9230
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: James dean | last post by:
I have heard that the video drivers in GDI+ are a big performance issue. But is this only an issue with something like Games Programming i think...is this wrong?. What about a drawing application...
1
by: James dean | last post by:
Could someone explain how this works. I think the graphics card is used to do blitting and drawing shapes like rectangles. How does it draw using the Graphics card on the PC and why is this feature...
7
by: | last post by:
We create VC++ programs that does some GDI drawing functionality. I discovered GDI+ and this seems to be a big step forward, and appears to be standard available in Windows XP and Windows Server...
12
by: ML | last post by:
I am trying to test a vb.net app in VirtualPC on a Win98 install. The app runs but I get "Generic GDI+" errors on any form with a groupbox. Does anyone know what this issue is or how to fix it? ...
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"...
2
by: PJ6 | last post by:
Anyone know if MS has plans to *ever* have GDI+ support hardware acceleration? Paul
1
by: Daniel | last post by:
Hi I had an app i write on DirectX that will nearly always run in a windowed situation. It could also have many instances running at a time and as such to keep the cpu usage down i had a frame...
110
by: alf | last post by:
Hi, is it possible that due to OS crash or mysql itself crash or some e.g. SCSI failure to lose all the data stored in the table (let's say million of 1KB rows). In other words what is the worst...
6
by: Marco Trapanese | last post by:
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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,...

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.