mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-19 23:03:56 -07:00
38 lines
No EOL
774 B
C++
Executable file
38 lines
No EOL
774 B
C++
Executable file
#ifndef __H_PROGRAMMANAGER_H__
|
|
#define __H_PROGRAMMANAGER_H__
|
|
|
|
#include <string>
|
|
#include "Singleton.h"
|
|
#include "renderer/VertexProgram.h"
|
|
|
|
typedef STL_HASH_MAP<std::string, CVertexProgram *> pp_map;
|
|
|
|
#define g_ProgramManager CProgramManager::GetSingleton()
|
|
|
|
|
|
class CProgramManager : public Singleton<CProgramManager>
|
|
{
|
|
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
|
|
pp_map m_VertexProgs;
|
|
#ifdef BUILD_CG
|
|
CGcontext m_Context;
|
|
CGprofile m_VPProfile;
|
|
CGprofile m_FPProfile;
|
|
#endif
|
|
};
|
|
|
|
#endif |