3

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?

genpfault
  • 51,148
  • 11
  • 85
  • 139
Jimmy Bouker
  • 118
  • 1
  • 10
  • It's not quite clear what effect exactly you're trying to get. Could you please explain it in more details in example of two (src/dst) ARGB colors? – real4x Mar 15 '12 at 17:50
  • I'm trying to just get ANY effect at all. And just as my question says I'm looking for the equivalent directX calls that will have the same effect as the above glBlenFunc() calls – Jimmy Bouker Mar 29 '12 at 23:08

2 Answers2

0

I ended up just switching to OpenGL. But thanks for the help guys :D

Jimmy Bouker
  • 118
  • 1
  • 10
0

Try:

graphicsDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE);
graphicsDevice->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA);
graphicsDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA);
tbridge
  • 1,754
  • 1
  • 18
  • 35
  • I tried the code and there was still no effect. I think there's something going on somewhere else. Maybe the way the device was set up is wrong – Jimmy Bouker Mar 14 '12 at 22:45