I modified the Shader example providing a a pixel-only hlsl shader and putting vertex shader file and procedure name to NULL.
Everything right but at rendertime i get an exception in this routine because the VSConstantsTable is NULL.
Code: Select all
bool CD3D9HLSLMaterialRenderer::OnRender(IMaterialRendererServices* service, E_VERTEX_TYPE vtxtype)
{
VSConstantsTable->SetDefaults(pID3DDevice);
return CD3D9ShaderMaterialRenderer::OnRender(service, vtxtype);
}
Code: Select all
if (VSConstantsTable) VSConstantsTable->SetDefaults(pID3DDevice);