   How to pause using Shader
  The RenderUsingShader function is render with shader in my program.But I want to set the function RenderWithoutShader doesn't use the shader.How do I set that?pd3dDevice->BeginScene();D3DXHANDLE hTechnique = m_pEffect_QVSM_ADAPTIVE->GetTechniqueByName("TShadowQVSM_ADPATIVE");RenderUsingShader();//<===ok.....RenderWithoutShader();//<=== the function content as belowm_pd3dDevice->SetTransform(D3DTS_WORLD, &m_matWorld);m_pd3dDevice->SetTransform(D3DTS_VIEW, &m_matView);m_pd3dDevice->SetTransform(D3DTS_PROJECTION, &m_matProj);m_pd3dDevice->SetStreamSource(0, g_pVB, 0,sizeof(sVertex));m_pd3dDevice->SetFVF(VERTEXFVF);//SetVertexShaderm_pd3dDevice->SetTexture(0, m_pShadowMap_QVSM_Tex_EyeDepth);// Draw the vertex bufferm_pd3dDevice->DrawPrimitive(D3DPT_TRIANGLESTRIP, 0, 2);// Release texturem_pd3dDevice->SetTexture(0, NULL);pd3dDevice->EndScene();
  Perhpas you're looking for SetVertexShader(NULL) before you call your RenderWithoutShader.If you're using an effect for the RenderUsingShader and you don't use m_pd3dDevice->SetVertexShader() then your code should work fine.if( useShader ) RenderUsingShader();else RenderWithoutShader();Are you having a problem with it?   ;  Buckeye,thank you!m_pd3dDevice->SetVertexShader(NULL);m_pd3dDevice->SetPixelShader(NULL);I add the two lines and it pauses the usage of Shader.