Advertisement

Using Direct3D in 2D...

Started by September 30, 1999 06:38 PM
0 comments, last by Mike 25 years, 2 months ago
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:

Setup

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.

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,

------------------

-Kentamanos

-Kentamanos

This topic is closed to new replies.

Advertisement