Jump to content
  • Advertisement


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


Using Direct3D in 2D...

This topic is 7011 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I would like to use Direct3D Immediate Mode in my 2D game in order to handle the alpha blending. I’m quite familiar with Direct Draw, but I’ve never used Direct3D. Generally speaking I would an outline as to what one would need to do in order to use Direct3D for alpha blending (and possibly light maps). Here is what I’ve got so far:


1. Of course I need to create all the global variables and include the needed libraries.
2. First I need to Create a direct draw object
3. Then create a primary surface
4. Now create a Direct3D object
5. Finnish Direct Draw setup (cooperative level, display mode, etc…)

Using it

1. Draw all Direct Draw stuff first.
2. Set the Direct3D object’s texture.
3. Call draw primitive (with the vertices that I’ve kept track of)

So far that is all I’ve pieced to gather. Do I really need to go through the trouble of setting up the view port and all the other 3D things if my only intent is to use Direct3D to draw an alpha blended primitive? I would appreciate any more information on the subject.

Share this post

Link to post
Share on other sites
Just a quick note...

Have you looked at the DX7 SDK and the D3DX library? It has sprite support, which I think is what you are really interested in doing here. It uses the 3D hardware to do rotations and scaling for you.

I think this is what you are after, but if it's not, sorry.

Good luck,



Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!