   How do render states work now?
  Hey there!Take this piece of Direct3D9 pseudo-code as example:// PREUDO CODE EXAMPLE //SetRenderState(ALPHABLEND_ON);SetRenderState(ALPHABLEND_STATS);// Start gameloopwhile(1){  SetRenderState(ALPHABLEND_ON);  DrawWater(); // Something that's supposed to be transparent  SetRenderState(ALPHABLEND_OFF);  DrawSolidStuff(); // Solid stuff  Present();}I always assumed that renderstates work in the way that the water is now drawn alphablended, and all the solid stuff isn't. However, when I execute my code, the water is just as solid as the solid stuff. Is this how it's supposed to be? Or is there just an error in my code?Enlighten me, please!   
  Must be an error in your code, the water should be drawn alphablended. But you also have to make sure to set the correct blending states (e.g. SrcBlend = SRC_ALPHA and DestBlend = INV_SRC_ALPHA) and to draw your water AFTER all solid objects, so the alphablended pixels can be blended with the solid pixels.So do it this way:1) Turn off alphablending2) Draw solid objects (front to back for better performance)3) Turn on alphablending4) Draw translucent objects back to front for correct blending   ;  No error, that's the way render states work. Although the first ALPHABLEND_ON can be left out of course; you're setting it later.But are you sure you set the Alpha component of the water color to something other than 255? And is the render order correct?   ;@ForHunter2Hmm...Well, ok, swapping the solid and transparents is a good idea. After checking (works), there is still something wrong with my code I think though:m_pD3DDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, true);while(1) // gameloop{  m_pD3DDevice->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA);  m_pD3DDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA);  DrawGlass();  m_pD3DDevice->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_ONE);  m_pD3DDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_ZERO);  DrawGlass();}Both glasses are drawn with alphablend-settings two (D3DBLEND_ONE and D3DBLEND_ZERO). Anyone know what could cause the problem?@Mike nlYou say that's how they work? Hmm...now I'm confused :S. And yes, I'm sure the water/glass has alpha components other than 255 :). Checked that. (Also, good to see a fellow dutchie :D)   ;  I'm betting that's not all the code. Because where's the BeginScene/EndScene and Present and the device pointer?From this it looks like you overdraw the transparent glass with the solid glass, but we can't see the world matrix you're using.So for starters, try posting the minimal game loop that exhibits the behavior as well as the DrawGlass function. Errors are usually in the code you didn't even consider could be wrong. [wink]   