1
0
forked from 0ad/0ad

Updates to fix VC2K5 compile problem

This was SVN commit r1276.
This commit is contained in:
Calefaction 2004-10-24 00:48:54 +00:00
parent 06051e3628
commit 09ce67303e
2 changed files with 12 additions and 11 deletions

View File

@ -21,7 +21,7 @@ CProgramManager::~CProgramManager()
CVertexProgram *CProgramManager::FindVertexProgram(const char *file)
{
CVertexProgram *prog = NULL;
std::hash_map<std::string, CVertexProgram *>::iterator iter;
pp_map::iterator iter;
if((iter = m_VertexProgs.find(std::string(file))) != m_VertexProgs.end())
return (CVertexProgram *)(*iter).second;

View File

@ -1,17 +1,18 @@
#ifndef __H_SHADERMANAGER_H__
#define __H_SHADERMANAGER_H__
#if _MSC_VER < 1300
# include <map>
# define hash_map map
#else
# include <hash_map>
#endif
#ifndef __H_PROGRAMMANAGER_H__
#define __H_PROGRAMMANAGER_H__
#include <string>
#include "Singleton.h"
#include "renderer/VertexProgram.h"
#if (_MSC_VER < 1300) || (_MSC_VER > 1310)
# include <map>
typedef std::map<std::string, CVertexProgram *> pp_map;
#else
# include <hash_map>
typedef std::hash_map<std::string, CVertexProgram *> pp_map;
#endif
#define g_ProgramManager CProgramManager::GetSingleton()
@ -32,7 +33,7 @@ private:
#ifdef BUILD_CG
void FindPPVersion();
#endif
std::hash_map<std::string, CVertexProgram*> m_VertexProgs;
pp_map m_VertexProgs;
#ifdef BUILD_CG
CGcontext m_Context;
CGprofile m_VPProfile;