CShaderVariant::operator LPDIRECT3DPIXELSHADER9 (void)
{
	LPDIRECT3DPIXELSHADER9 pValue = NULL;
	m_pParent->getD3DXEffect()->GetPixelShader(m_hParam, &pValue);

	// GetPixelShader adds to the ref. count - Undo it!
	if(pValue) pValue->Release();

	return pValue;
}
Beispiel #2
0
void DestroyShaders() {
	if (pFramebufferVertexShader) {
		pFramebufferVertexShader->Release();
	}
	if (pFramebufferPixelShader) {
		pFramebufferPixelShader->Release();
	}
	if (pFramebufferVertexDecl) {
		pFramebufferVertexDecl->Release();
	}
	if (pSoftVertexDecl) {
		pSoftVertexDecl->Release();
	}
}