I am having a problem with a map I made in irrEdit (mesh from 3ds max)
It seems if you even get a small amount away from the mesh (with irrlicht), it becomes invisible until you go near it again. This is probably because my scale is too high, but I need it that way. Is there any variable I can edit to make the drawing distance larger. I am using OpenGl for my device. I know doing this will slow the game down but I really need a much higher draw distance, especially for really really large levels.
Please Help ASAP!
Here is my current code:
Code: Select all
#include <irrlicht.h>
#include <windows.h>
using namespace irr;
using namespace core;
using namespace gui;
using namespace video;
using namespace scene;
#pragma comment(lib, "Irrlicht.lib")
int APIENTRY WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow){
IrrlichtDevice *device = createDevice(EDT_OPENGL, dimension2d<s32>(640, 480), 32, false, false, false, 0);
if (device == 0){
return 1;
}
IVideoDriver* driver = device->getVideoDriver();
ISceneManager* smgr = device->getSceneManager();
IGUIEnvironment* guienv = device->getGUIEnvironment();
smgr->loadScene("3d1.irr");
smgr->addCameraSceneNodeFPS(0,600.0f,500.0f,-1,0,0,false,400.0f);
HWND lHwnd = FindWindow("Shell_TrayWnd",NULL);
SendMessage(lHwnd,WM_COMMAND,419,0);
while(device->run())
if (device->isWindowActive())
{
driver->beginScene(true, true, video::SColor(0,0,0,0));
smgr->drawAll();
driver->endScene();
}
//Drop the textures and stuff that is already loaded to preserve memory, after it has been already loaded.
device->drop();
//return 0 if everything has worked!
return 0;
}