Jump to content
  • Advertisement
Sign in to follow this  
MuchoPichu

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

This topic is 3792 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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!