Sign in to follow this  

DX Material History (10?, 9, 8, ... etc)

This topic is 3631 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

Hi Folks, I am writing a class for modifying DX material properties, and I was thinking of implementing it as a template to handle different versions of DirectX. Curious if anyone knows how long the DX material structure has been around in the form:

typedef struct _D3DMATERIAL8 {
    D3DCOLORVALUE   Diffuse;
    D3DCOLORVALUE   Ambient;
    D3DCOLORVALUE   Specular;
    D3DCOLORVALUE   Emissive;
    float           Power;
} D3DMATERIAL8;

and if there is something similar in DX10? Thanks - Mucho.

Share this post


Link to post
Share on other sites
Well, that material structure is for the fixed pipe's lighting. You need to make your own for shader usage (or have the shader expect that one). Seeing as how D3D10 doesn't have a fixed pipeline anymore, D3D10 has no pre-defined material structure.

If you're starting an engine now, it will likely be for shader capable hardware. You can make your own light and material structures and use them across DX8, DX9, D3D10, OpenGL w/ GLSL or Cg.

Share this post


Link to post
Share on other sites

This topic is 3631 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.

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