Sign in to follow this  
_Phalanx_

Setting DX render states for a 2D game-HELP

Recommended Posts

Hey, Im writing a 2D game with DirectX, It is a top down shooter and I am drawing ships by simply pasting textures onto rects. And am using point sprites with textures on them for bullets. Anyways, im worried direct is preforming all kinds of 3D stuff that is not necisary for what im doing, pretty much the only advanced thing I am using is alpha blending. So i was wondering how I should set the render states and what FVF feilds I should use. Thanks alot.

Share this post


Link to post
Share on other sites
For 2D stuff I personally use:

(D3DFVF_XYZRHW Or D3DFVF_TEX1 Or D3DFVF_DIFFUSE Or D3DFVF_SPECULAR)
ZEnable = False
Lighting = False

and just don't set up the world/projection matrices. Works fine for me, but I'm sure there's a better way to go about it.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this