Sign in to follow this  
jdub

Simple DirectX questions

Recommended Posts

jdub    459
in a DirectX transformed structure:
struct TransformedVertex
	{
		float X;
		float Y;
		float Z;
		float Rhw;
	}

1. is this the correct order for floats in the structure? On msdn, they just say that the order is: float, float, float, float. 2. what the heck is Rhw for??? 3. Say I wanted to combine the D3DFVF_XYZRHW flag with the D3DFVF_DIFFUSE flag. Would the order of the structure elements be, the way I passed the flags in? in this case:
struct TransformedVertex
	{
		float X;
		float Y;
		float Z;
		float Rhw;
		DWORD color;
	}

Thanks in advance.

Share this post


Link to post
Share on other sites
alnite    3436
Quote:
Original post by jdub
in a DirectX transformed structure:

*** Source Snippet Removed ***

1. is this the correct order for floats in the structure? On msdn, they just say that the order is: float, float, float, float.

I believe so.

Quote:

2. what the heck is Rhw for???

This is a good thread that discusses rhw:
http://www.gamedev.net/community/forums/topic.asp?topic_id=440283

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