Hello,
I'm searching an example code of OBJ file reading and display. Code and OBJ file.
If you have one, please send me a mail (publicite@davidimboden.net) with code and the obj file.
If possible for .net version.
Thanks a lot
example of OBJ file reading
code
Hello,
I do that, but nothing on the screen, what's wrong? Please.
I do that, but nothing on the screen, what's wrong? Please.
Code: Select all
IrrlichtDevice *device =
reateDevice(driverType, core::dimension2d<s32>(640, 480));
if (device == 0)
return 1; // could not create selected driver.
= device->getVideoDriver();
scene::ISceneManager* smgr = device->getSceneManager();
scene::IAnimatedMesh* mesh = smgr->getMesh("MayaTest.obj");
scene::ISceneNode* node = 0;
if (mesh)
node = smgr->addOctTreeSceneNode(mesh->getMesh(0));
smgr->addCameraSceneNodeFPS();
device->getCursorControl()->setVisible(false);
int lastFPS = -1;
while(device->run())
if (device->isWindowActive())
{
driver->beginScene(true, true, video::SColor(0,200,200,200));
smgr->drawAll();
driver->endScene();
int fps = driver->getFPS();
if (lastFPS != fps)
{
core::stringw str = L"test obj [";
str += driver->getName();
str += "] FPS:";
str += fps;
device->setWindowCaption(str.c_str());
lastFPS = fps;
}
}
device->drop();
return 0;
try to look at ur console. propl theres an error in load of either mesh or textures
OR!! -the mesh -is- loaded but it is either scaled to big -eg cam are -in- it and therefore nothing is seen -or it is scaled to smal and need to upscaled before it is visible
-both are very common 'problems'
-real- problems are different ;)
OR!! -the mesh -is- loaded but it is either scaled to big -eg cam are -in- it and therefore nothing is seen -or it is scaled to smal and need to upscaled before it is visible
-both are very common 'problems'
-real- problems are different ;)
Regards.
Tech: win98se| 320mb ram| abitbe6| 433mhzceleron| atiRadeon7000.64mb| soundblaster125| dx9.0b | devCPP | IRR 0.12.0 |
Tech: win98se| 320mb ram| abitbe6| 433mhzceleron| atiRadeon7000.64mb| soundblaster125| dx9.0b | devCPP | IRR 0.12.0 |