#ifndef __H_SHADERMANAGER_H__ #define __H_SHADERMANAGER_H__ #if _MSC_VER < 1300 # include # define hash_map map #else # include #endif #include #include "Singleton.h" #include "renderer/VertexProgram.h" #define g_ProgramManager CProgramManager::GetSingleton() class CProgramManager : public Singleton { public: CProgramManager(); ~CProgramManager(); CVertexProgram *FindVertexProgram(const char *file); void Bind(CVertexProgram *prog); void WritePPInfo(FILE *file); #ifdef BUILD_CG CGcontext GetContext() { return m_Context; } #endif private: #ifdef BUILD_CG void FindPPVersion(); #endif std::hash_map m_VertexProgs; #ifdef BUILD_CG CGcontext m_Context; CGprofile m_VPProfile; CGprofile m_FPProfile; #endif }; #endif