Jump to content
Xtreme .Net Talk

Recommended Posts

Posted
GDI+ has quite a lot of goodies. Would it be possible to combine the two to generate cool effects such as alpha blending? Anyone have a clue? Or is D3D the only way to go if you want fast and nice effects?
  • *Experts*
Posted

Normally, you won't be using GDI and DirectX at the same time. You may use some GDI functions to read in image file formats that DirectX doesn't support, but as far as actual drawing to the screen you'll most likely use one or the other.

 

What kind of program did you have in mind? Do you just want cool effects, or were you writing a game?

 

DirectDraw doesn't support alpha blending (translucency) but does support color keys (transparent regions). Direct3D support pretty much everything, but the learning curve is steeper.

 

If you want DirectX and normal window controls to intermix (such as a textbox), you might have problems. With GDI+ you probably won't have any issues.

 

-Nerseus

"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
Posted
I was thinking bout actually combining gdi and dd to draw. But as you say there is prob no way to do that. Oh, well. Guess i'll have to learn D3D, but that will be fun too :)
  • *Experts*
Posted

There used to be a way to get the Handle to the Backbuffer so that you could use the API to draw directly onto it, but I'm not sure if it's there in DX9.

 

This might be desirable if you need to draw some primitives that GDI+ can do but DirectX can't, such as an Arc, a Bezier curve, etc.

 

-nerseus

"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...