mVertexShader = CreateVertexShader("simple.cg",VBF_FORMAT0,(unsigned int) m_pd3dDevice ); // create a shader using this vertex format and this 3d // device. mVertexShader->ActivateBindings(this,0,0); // apply all dynamically bound // data items. mVertexShader->Activate(); // activate this shader program on the // hardware ReleaseVertexShader(mVertexShader); // release shader when we are done // with it.
Example 3: Calls necessary for a application to support a Cg program that requires a world-view-projection matrix.