#include <irrlicht.h>
//los namespace para definir funciones de irrlicht
using namespace irr;
using namespace core;
using namespace video;
using namespace scene;
#if defined(_MSC_VER)
#pragma comment(lib, "Irrlicht.lib")
#endif
int main()
{
//define un device para la pantalla
IrrlichtDevice *device = createDevice(EDT_OPENGL, dimension2d<u32>(640, 480), 16, false,
false, false, 0);
if (!device)
return 1;
IVideoDriver *driver = device->getVideoDriver();
ISceneManager *scene = device->getSceneManager();
IMesh *mesh = scene->getMesh("skullkid.obj");
IMeshSceneNode *node = scene->addMeshSceneNode(mesh);
scene->addCameraSceneNode(0, vector3df(0, 30, -40) , vector3df( 0 , 5 , 0));
//Gameloop
while (device->run())
{
driver->beginScene(true, true, SColor(255,255,255,255));
scene->drawAll();
driver->endScene();
}
//cerrar device
device->drop();
return 0;
}
No hay comentarios:
Publicar un comentario