#if defined(JAMBUILD)
#include <Mudbox/mudbox.h>
#include <Mudbox/MudBoxGL.h>
#else
#include "../../include/Mudbox/mudbox.h"
#include "../../include/Mudbox/MudBoxGL.h"
#endif
#include <Cg/cg.h>
#include <Cg/cgGL.h>
using namespace mudbox;
class ToonMaterial : public Material
{
DECLARE_CLASS;
public:
ToonMaterial( void );
~ToonMaterial( void );
bool Activate( const Mesh *pMesh, const AxisAlignedBoundingBox &cUVArea, const Color &cColor );
void Deactivate( void );
void OnNodeEvent( const Attribute &cAttribute, NodeEventType cType );
bool IsTCNeeded( void ) const { return true; };
private:
CGprogram m_VertexProgram;
CGprogram m_FragmentProgram;
CGcontext m_CGContext;
CGprofile m_FragmentProfile;
CGprofile m_VertexProfile;
CGparameter m_LightPositionParam;
CGparameter m_EyePositionParam;
CGparameter m_ShininessParam;
CGparameter m_ModelViewProjParam;
CGparameter m_KdParam;
CGparameter m_KsParam;
CGparameter m_DiffuseRampParam;
CGparameter m_SpecularRampParam;
CGparameter m_EdgeRampParam;
GLuint m_iDiffuseRamp;
GLuint m_iSpecularRamp;
GLuint m_iEdgeRamp;
acolor m_aKd;
acolor m_aKs;
afloatr m_aShininess;
};