#ifndef _hwRefractReflectShader_NV20
#define _hwRefractReflectShader_NV20
#include <maya/MPxHwShaderNode.h>
#include "MTextureCache.h"
{
public:
hwRefractReflectShader_NV20();
virtual ~hwRefractReflectShader_NV20();
void releaseEverything();
int prim,
unsigned int writable,
int indexCount,
const unsigned int * indexArray,
int vertexCount,
const int * vertexIDs,
const float * vertexArray,
int normalCount,
const float ** normalArrays,
int colorCount,
const float ** colorArrays,
int texCoordCount,
const float ** texCoordArrays);
static void * creator();
MTextureCache *m_pTextureCache;
void loadVertexProgramGL(
M3dView& view );
float* computeBinormals(int indexCount, const unsigned int * indexArray,
int vertexCount, const float* vertexArray,
const float* normalsArray,
const float* texCoordsArray);
protected:
void init_ext(const char *ext);
MCallbackId fBeforeNewCB;
MCallbackId fBeforeOpenCB;
MCallbackId fBeforeRemoveReferenceCB;
MCallbackId fMayaExitingCB;
void attachSceneCallbacks();
void detachSceneCallbacks();
static void releaseCallback(void* clientData);
private:
GLuint vertex_program_id;
GLuint fTextureName;
float fRefractionIndex;
float fReflectivity;
double fCameraRotationAngle;
};
#endif