Code: Select all
sceneManager->addMeshSceneNode(sceneManager->getMesh("C:\\example.3ds"), 0, -1, irr::core::vector3df(0, 0, 0), irr::core::vector3df(0, 0, 0), irr::core::vector3df(-1, 1, 1));
Code: Select all
sceneManager->addMeshSceneNode(sceneManager->getMesh("C:\\example.3ds"), 0, -1, irr::core::vector3df(0, 0, 0), irr::core::vector3df(0, 0, 0), irr::core::vector3df(-1, 1, 1));
Code: Select all
sceneManager->addMeshSceneNode(sceneManager->getMesh("C:\\example.3ds"));
Code: Select all
sceneManager->addMeshSceneNode(sceneManager->getMesh("C:\\example.3ds"), 0, -1, irr::core::vector3df(0, 0, 0), irr::core::vector3df(0, 0, 0), irr::core::vector3df(-1, 1, 1));
Code: Select all
#include <irrlicht.h>
int main(int argc, char **argv){
irr::IrrlichtDevice *device = irr::createDevice (
irr::video::EDT_OPENGL,
irr::core::dimension2d<irr::u32>(800,600),
32,
false,
true,
false,
0);
irr::video::IVideoDriver *driver = device->getVideoDriver();
irr::scene::ISceneManager *sceneManager = device->getSceneManager();
sceneManager->addCameraSceneNode(0, irr::core::vector3df(-3, 3, 0), irr::core::vector3df(0, 0, 0));
irr::scene::IMeshSceneNode *mesh = sceneManager->addMeshSceneNode(sceneManager->getMesh("C:\\Users\\dduck\\Desktop\\untitled.3ds"), 0, -1, irr::core::vector3df(0, 0, 0), irr::core::vector3df(0, 0, 0), irr::core::vector3df(-1, 1, 1));
mesh->setMaterialFlag(irr::video::EMF_LIGHTING, false);
while(device->run()){
driver->beginScene(true, true, irr::video::SColor(255, 132, 165, 244));
sceneManager->drawAll();
driver->endScene();
}
return 0;
}
Code: Select all
irr::scene::IMeshSceneNode *mesh = sceneManager->addMeshSceneNode(sceneManager->getMesh("C:\\example.3ds"), 0, -1, irr::core::vector3df(0, 0, 0), irr::core::vector3df(0, 0, 0), irr::core::vector3df(-1, 1, 1));
for(unsigned int i = 0; i < mesh->getMaterialCount(); i++){
mesh->getMaterial(i).BackfaceCulling = false;
mesh->getMaterial(i).FrontfaceCulling = true;
}
Code: Select all
for(unsigned int i = 0; i < mesh->getMaterialCount(); i++){
mesh->getMaterial(i).BackfaceCulling = false;
mesh->getMaterial(i).FrontfaceCulling = false;
}