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 refresh sticker ever 32 ms rather
than maximum speed. This worked great but then i thought as all my graphics
are 2D this is huge over kill.
So i decided to port it to GDI graphics. At first a good idea i could easily
do everything i was using with Directx but less end requirements for the
user and much smaller code and less 'set up' code.
However first i found severe flicker with the GDI solution. So i implemented
a double buffer which solved the flicker but all my transparent imagery was
lost (due to the doubling up). I found if i clear the back buffer to prevent
doubling up i get a flicker again.
this all aside a even bigger problem, my cpu usage is FAR worse than it was
with directx. With a refresh every second it still spikes to 18% for one
instance. I have seen rival products on the market use simple graphics who
keep the cpu under 5% when i had 10 instances open.
What am i doing wrong? Is it possible to make an efficient GDI app?