Jump to content
  • Advertisement
Sign in to follow this  

Vertex Shader and Fixed Function Pipeline in DX9.0C

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

when i create a device with D3DCREATE_HARDWARE_VERTEXPROCESSING,i found after i draw sth use vertexshader,the matrix in d3d transformation engine is reset to Identity,pls see code below pD3D9->CreateDevice( D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hWnd, D3DCREATE_HARDWARE_VERTEXPROCESSING, &d3dpp, &pd3dDevice9 ); //settransform before use vertexshader pd3dDevice9->SetTransform(D3DTS_PROJECTION,&projMtx); pd3dDevice9->SetTransform(D3DTS_VIEW,&viewMtx); pd3dDevice9->SetTransform(D3DTS_WORLD,&worldMtx); //draw something using vertexshader pd3dDevice9->SetVertexDeclaration(pDecl); pd3dDevice9->SetVertexShader(pShader); pd3dDevice9->SetStreamSource(); pd3dDevice9->DrawXXXXX() //draw something using fixed function pd3dDevice9->SetVertexShader(NULL); pd3dDevice9->SetFVF(CUSTOM_FVF); pd3dDevice9->DrawXXXXX();//here the vertices seems not transformed by projMtx,viewMtx,worldMtx but when i use D3DCREATE_SOFTWARE_VERTEXPROCESSING to create a device,it will not happen.can anyone tell me why?

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!