Advertisement Jump to content
Sign in to follow this  

2 managed DX questions

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

These come from the artist in my programming group. 1) How do you assign an FX file to a mesh? 2) How doe you render a mesh with a texture that has alpha information? Right now when rendering the texture the alpha values are all black. I tried setting the device up for alpha blending before rendering the first subset of the mesh, but this made it so we could see through the entire mesh in the alpha areas.

Share this post

Link to post
Share on other sites
Well question number one is beyond my level of knowledge now. I can point you to here: "(SDK root)\Samples\C++\Direct3D\PostProcess" where it has been done, but it is a microsoft sample, so good luck with that one.

Question number two I can give you some more info about, the following commands will enable alphablending:

g_pd3dDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE);
g_pd3dDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_SRCALPHA);

You need to experiment with the last arguments of the last 2 statements. The key of alpha blending lies there.

I hope this helps you someway somehow...

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!