DirectX equivalent of glBlendFunc(............)

Posted by Jimmy Bouker on Stack Overflow See other posts from Stack Overflow or by Jimmy Bouker
Published on 2012-03-14T20:53:14Z Indexed on 2012/04/08 5:29 UTC
Read the original article Hit count: 191

I created a particle System in OpenGl that's working great. When I want to get a burning effect of a fire or a beam or something(Where the system kind of "glows" and fuses all the colors together) I use this method call with OpenGL.

glBlendFunc(GL_SRC_ALPHA,GL_SRC_ALPHA) 
glBlendFunc(GL_DST_ALPHA,GL_ONE)

I'm now trying to do the same thing using Direct3D

Here is what I have tried:

graphicsDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE);
graphicsDevice->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA);
graphicsDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_ONE);

but this has absolutely no effect at all on the look of my game! Anyone have a clue what could be the problem?

© Stack Overflow or respective owner

Related posts about c++

Related posts about opengl