#ifndef _hwPhongShader
#define _hwPhongShader
#include <maya/MPxHwShaderNode.h>
#include <maya/MPoint.h>
#include <maya/MHardwareRenderer.h>
#include <maya/MGeometryData.h>
{
public:
hwPhongShader();
~hwPhongShader() override;
SchedulingType
schedulingType()
const override {
return SchedulingType::kParallel; }
static void * creator();
float Transparency() const { return mTransparency; }
const float3 * Ambient() const { return &mAmbientColor; }
const float3 * Diffuse() const { return &mDiffuseColor; }
const float3 * Specular() const { return &mSpecularColor; }
const float3 * Shininess() const { return &mShininess; }
void setTransparency(const float fTransparency);
void setAmbient(const float3 &fAmbient);
void setDiffuse(const float3 &fDiffuse);
void setSpecular(const float3 &fSpecular);
void setShininess(const float3 &fShininess);
void printGlError( const char *call );
bool attributesChangedVP2() { return mAttributesChangedVP2; }
void markAttributesChangedVP2() { mAttributesChangedVP2 = true; }
void markAttributesCleanVP2() { mAttributesChangedVP2 = false; }
private:
float3 mAmbientColor;
float mTransparency;
float3 mDiffuseColor;
float3 mSpecularColor;
float3 mShininess;
unsigned int mGeometryShape;
bool mAttributesChanged;
bool mAttributesChangedVP2;
};
#endif