Sorry for my english, I'm french.
I have two little problems :
1) I've created a terrain with T.Ed (from D-Grafix). I exported it as a B3D Mesh, with vertex alpha and a Negative Offset.
Here's what I get when I import it in irrEdit :
2) My program is like this :
Code: Select all
#define SERVER_PORT 47850
#define RANDOM_DATA_SIZE 200
char randomData[RANDOM_DATA_SIZE];
#include <stdlib.h> // For atoi
#include <cstring> // For strlen
#include "IRR/Irrlicht.h"
#include "classNetClient.h"
#ifdef _WIN32
#include <windows.h> // Sleep
#else
#include <unistd.h> // usleep
#include <cstdio>
#endif
using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;
using namespace std;
int main(void)
{
IrrlichtDevice *irrDevice = createDevice(EDT_OPENGL, dimension2d<s32>(800, 600),32,false,true,false,0);
irrDevice->setWindowCaption(L"War of Shattrith");
IVideoDriver* irrDriver = irrDevice->getVideoDriver();
ISceneManager* irrSceneMgr = irrDevice->getSceneManager();
IGUIEnvironment* irrGUIEnv = irrDevice->getGUIEnvironment();
irrGUIEnv->addStaticText(L"Hello World! Irrlicht Project is here!!", rect<int>(10,10,200,30), true, true, 0, -1);
// Loading the level Mesh
irrSceneMgr->loadScene("DATA\\Lands\\GlueScreen\\irrsc.irr");
// Adding an FPS Camera
irrSceneMgr->addCameraSceneNodeFPS();
//IGUIStaticText* textStatique1;
IGUIStaticText* textStatique1 = irrGUIEnv->addStaticText(L"Test text 1", rect<int>(10,10,200,100),false);
while(irrDevice->run())
{
irrDriver->beginScene(true, true, SColor(255,100,101,140));
//textStatique1->setText(L"Texte changé");
irrSceneMgr->drawAll();
irrGUIEnv->drawAll();
irrDriver->endScene();
}
irrDevice->drop();
return(0);
return 0;
}
When the GUI is draw, the mesh disappear.
If the GUI is not drawn, or if there's nothing to draw, the mesh is here.
I'm using irrEdit 1.4-alpha, and irrlicht 1.4beta. The OctTree is converted by irrEdit to an irrMesh.