Archived

This topic is now archived and is closed to further replies.

Zimans

DirectX Windowed slower than GDI

Recommended Posts

Originally my map editor was using the windows GDI as the promary graphic interface to draw the map in the window. It ran acceptable, but lacked some features that I wanted to have so I converted it over to DirectX windowed. Boom, major performance hit.. Where the GDI blinks the DirectX plugs along.. Doesa anyone have any performance tips for windowed directx or any suggestions in general that might make this faster.. Seems to me that DirectX ought to be able to out-perform the Windows GDI.... -Zims

Share this post


Link to post
Share on other sites
Zimans, a person who knows what they are doing in WinGDI will almost always have a faster program than a person who doesn't know what they are doing in Direct Draw.

Before I attempt to help you, download a sample map editor I wrote (very basic and missing a lot of features) to see if it's fast enough for you. It's not optimized, so maybe not, but if it is, then I will help.

You can grab it here.

(Sorry about the anon post. Pressed submit, then pressed stop immediately as I didn't include my name. Didn't realize it went through.)

Edited by - Nytegard on June 14, 2000 3:47:14 PM

Share this post


Link to post
Share on other sites
to Nytegard:
It''s plenty fast enough. (If you wrote that in a few hours on a whim then I applaude you.) What rendering method are you using there? It seems that what I have should be fster, maybe I''m just making some mistake I haven''t caught yet..

I''d greatly apreciate any help you are willing to throw my way.
The e-mail address in my profile is correct, so please feel free to share any knowledge that you are willing to share.

My Thanks,
-Zims

Share this post


Link to post
Share on other sites
quote:
Original post by null_pointer

If you''ve got a multi-monitor system, I read in the docs somewhere that DirectDraw doesn''t use the hardware acceleration by default. I think you have to look it up under "device window" and "focus window."



That''s only if the window is on the other monitor or in between monitors.

But yah, you have to set up 2 device windows and 2 primary surfaces if you want optimal performance under MultiMon/windowed.

- n8



nathany.com

Share this post


Link to post
Share on other sites
I believe it depends on the video card and drivers.

The Riva Tnt2 at work only gives about 1 fps in windowed mode.. I though the program has hung!!.. No GDI can be that slow!!..

but at home, the matrox G400 gives decent fps in windowed mode..

And null pointer is correct.. there is no acceleration in windowed mode..

Share this post


Link to post
Share on other sites
I know there is no hardware acceleration, but still, it should be alot faster than it is..

The main reason i swapped over to DirectX is transparency. Doing transparency in GDI is a bit tricky. Even more tricky if Black isn''t your transparent color. If everything was 8-but, that''d make things a bit easier as well, but my engine design is 16/32 bit. oh well, maybe I should convert over to doing all my drawing work in memory myself, instead of loading everything into a surface and doig blit''s...

-Zims

Share this post


Link to post
Share on other sites
quote:
Original post by Zimans

I know there is no hardware acceleration, but still, it should be alot faster than it is..




Theoretically yes.. reality..hmmm..

If you don''t want the editor to run on win95, you can use the transparentblt function to achieve transparency in win32.. not too much tricker..

Share this post


Link to post
Share on other sites