-----------------------------------------------------
//FILE##global.h
extern Texture2D* gpTerrainTexture;
//FILE##global.cpp
#include "global.h"
Texture2D * gpTerrainTexture = new gpTerrainTexture;
//FILE##HeightMapSourceImage.h
#include "Texture2D.h"
class HeightMapSourceImage
{
public:
HeightMapSourceImage(Texture2D*& terrainTexture)
:_terrainTexture(terrainTexture)
{
gpTerrainTexture;//why error C2065 occurs?
}
private:
Texture2D * _terrainTexture;
};
// if there is a HeightMapSourceImage.cpp implementation and reference to gpTerrainTexture,
// then the error C2065 disappears.
----------------------------------------------------------
No comments:
Post a Comment