but i got problems using it properly. I successfully compiled the source from his website http://www.spintz.com/irrlicht/geomipmapscenenode/ . I've gotten through the post http://irrlicht.sourceforge.net/phpBB2/ ... php?t=5166 which talks about it and tried to use an example code from it. I got some problems which was related to an update that was made after that post. My program compiled fine using the modified spintz's includes and lib. But i kept getting access violation errors, the program always crashes while trying to load the heightmap
Here's my example sourcecode i'm trying to get to work fine :
Code: Select all
#include <irrlicht.h>
#include <iostream>
using namespace std;
using namespace irr;
#pragma comment(lib, "Irrlicht.lib")
int main()
{
IrrlichtDevice *device =
createDevice(video::EDT_DIRECTX9, core::dimension2d<s32>(640, 480));
video::IVideoDriver* driver = device->getVideoDriver();
scene::ISceneManager* smgr = device->getSceneManager();
scene::IGeoMipMapSceneNode* mipmap = smgr->addGeoMipMapSceneNode(0, 0, 5, scene::EPS_17,
core::vector3df (0.0f, 0.0f, 0.0f), core::vector3df (0.0f, 0.0f, 0.0f),
core::vector3df (0.0f, 0.0f, 0.0f));
mipmap->LoadHeightMap("freeworld04.bmp");
mipmap->setMaterialTexture ( 0, driver->getTexture ( "grassdetail.bmp" ) );
mipmap->setMaterialTexture ( 1, driver->getTexture ( "freeworld04_lightmap.bmp" ) );
mipmap->setMaterialFlag ( video::EMF_LIGHTING, false );
mipmap->setMaterialFlag ( video::EMF_WIREFRAME, true );
mipmap->setMaterialType ( video::EMT_LIGHTMAP );
smgr->addCameraSceneNodeFPS();
device->getCursorControl()->setVisible(false);
while(device->run())
{
driver->beginScene(true, true, video::SColor(0,200,200,200));
smgr->drawAll();
driver->endScene();
}
device->drop();
return 0;
}
Could anyone help me?
If you have any working code that uses it already, please paste it on this forum it will be very useful for me!