Well, the Irrlicht project is way to big for this (about 290 cpp files) !!!
But I have a little project that I tested like you said, but no changes, all is build every time !!!
this are the 3 project files:
main.cpp
#include "cMapDemo.h"
int main(){
cMapDemo demo;
demo.run();
return 0;
}
cMapDemo.h
#ifndef CMAPDEMO_H
#define CMAPDEMO_H
#include <Irrlicht.h>
using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;
class cMapDemo : public IEventReceiver{
private:
IrrlichtDevice* device;
IVideoDriver* driver;
ISceneManager* smgr;
IGUIEnvironment* env;
bool prgDead;
bool terraWireframe;
bool showPathNodes;
ITerrainSceneNode* terrain;
ICameraSceneNode* camera;
public:
virtual bool OnEvent(SEvent event);
void run();
};
#endif // CMAPDEMO_H
cMapDemo.cpp
#include "cMapDemo.h"
bool cMapDemo::OnEvent(SEvent event){
if(event.EventType == EET_KEY_INPUT_EVENT && !event.KeyInput.PressedDown){
switch(event.KeyInput.Key){
case KEY_ESCAPE:{
prgDead = true;
return true;
}break;
case KEY_F1:{
terraWireframe = !terraWireframe;
terrain->setMaterialFlag(EMF_WIREFRAME, terraWireframe);
return true;
}break;
case KEY_F2:{
showPathNodes = !showPathNodes;
return true;
}break;
}
}
return false;
}
void cMapDemo::run(){
prgDead = false;
terraWireframe = false;
showPathNodes = false;
device = createDevice(EDT_DIRECT3D9, dimension2d<s32>(640, 480));
device->setEventReceiver(this);
driver = device->getVideoDriver();
smgr = device->getSceneManager();
env = device->getGUIEnvironment();
driver->setTextureCreationFlag(video::ETCF_ALWAYS_32_BIT, true);
device->getCursorControl()->setVisible(false);
SKeyMap keyMap[8];
keyMap[0].Action = EKA_MOVE_FORWARD;
keyMap[0].KeyCode = KEY_UP;
keyMap[1].Action = EKA_MOVE_FORWARD;
keyMap[1].KeyCode = KEY_KEY_W;
keyMap[2].Action = EKA_MOVE_BACKWARD;
keyMap[2].KeyCode = KEY_DOWN;
keyMap[3].Action = EKA_MOVE_BACKWARD;
keyMap[3].KeyCode = KEY_KEY_S;
keyMap[4].Action = EKA_STRAFE_LEFT;
keyMap[4].KeyCode = KEY_LEFT;
keyMap[5].Action = EKA_STRAFE_LEFT;
keyMap[5].KeyCode = KEY_KEY_A;
keyMap[6].Action = EKA_STRAFE_RIGHT;
keyMap[6].KeyCode = KEY_RIGHT;
keyMap[7].Action = EKA_STRAFE_RIGHT;
keyMap[7].KeyCode = KEY_KEY_D;
camera = smgr->addCameraSceneNodeFPS(0, 100, 500, -1, keyMap, 8);
camera->setPosition(core::vector3df(0,2055,-1110));
camera->setTarget(core::vector3df(0,0,10));
camera->updateAbsolutePosition();
camera->setFarValue(12000.0f);
// create a new (correct) terrain
terrain = smgr->addTerrainSceneNode2("Media/heightmap2.bmp");
terrain->setScale(vector3df(40.0, 1.0, 40.0));
terrain->setPosition(vector3df(0.0, 0.0, -10.0));
terrain->setMaterialFlag(EMF_LIGHTING, false);
terrain->setMaterialTexture(0, driver->getTexture("Media/terratex2.bmp"));
ITriangleSelector* selector = smgr->createTerrainTriangleSelector(terrain, 0);
terrain->setTriangleSelector(selector);
selector->drop();
while(device->run() && !prgDead){
if(device->isWindowActive()){
driver->beginScene(true, true, 0 );
smgr->drawAll();
env->drawAll();
driver->endScene();
}
}
device->drop();
}
But what is really curious is that it does not recompile if I add the external include dir for Irrlicht to the default compiler settings and not to the project's compiler settings !?!?!
Also all is correct if I delete all the Irrlicht related stuff out of cMapDemo.cpp and cMapDemo.h !?!?!
EDIT:
I also tested it with some other sdks like Newton Physics !!!
The same behavior, if the include dir is added to the project settings it recompiles always !!!
If the include dir is added to the default settings, all is correct !!!
So I think there must be the error with the project's compiler settings include dirs !?!?!