Archived

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

Vanz

Mixing GDI and DirectX

Recommended Posts

I''m in the process of learning DirxtX 8, yet am real comfortable with gdi. Do most people generally stick to all DirectX stuff or mix and match where they feel comfortable. For example I will be using polygon meshed men in directX but was wanting to use BitBlt for presenting my menus. Or for using fonts I am comfortable with CreateFont and textout or should I be using Drawtext. I can handle my mouse and keyboard commands fine (obviouly not gdi but using standard windows messaging commands, i.e. WM_KEYDOWN, WM_LBUTTONDOWN) so can I skip the the directinput section of the book I''m reading or do most people use strictly directx functions once starting in directx... The other reason I am asking is that it seems the standard Windows functions and gdi seem to be more stable and compatible with differemt OS''s and processors. Thanks, rhuala

Share this post


Link to post
Share on other sites
I would rather not mix GDI and DX together. You can end up with unwanted results. If you''re doing something with DX, then do it totally in DX...

Ivan

Share this post


Link to post
Share on other sites
I''m curious, on what other OS beside window are windows function and gdi more stable and compatible?

The reason why the GDI function aren''t used very much with DX is that they generaly slow down things.

Share this post


Link to post
Share on other sites
quote:
I''m curious, on what other OS beside window are windows function and gdi more stable and compatible?

The reason why the GDI function aren''t used very much with DX is that they generaly slow down things.

When I said other OS''s I was referring to other Windows OS''s (i.e. 95, 98, ME, NT, XP, 2000 ...etc). GDI works with all versions of NT where DirectX does not (I realize NT is hardly used anymore, just an example)

Also, I know they slow things down if not used properly that''s why I was saying I would use them for menus and such.

quote:
If you''re not careful, it can lead to a real mess


Any examples of this? I''m curious why you say this?

Anyways, thanks for the replies it sounds like it would be best just to stick with one and stay with it.

rhuala

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
quote:
Original post by rhuala
... I am comfortable with CreateFont and textout or should I be using Drawtext...



Using DrawText(), you can specify the justifciation and wrapping method for your text. If you build a wrapper class around it, it''ll be very easy to work with.

Share this post


Link to post
Share on other sites