1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
| #include <irrlicht/irrlicht.h>
#include<iostream>
int main(void)
{
std::cout << "test" << std::endl;
irr::IrrlichtDevice *device = irr::createDevice( // creation device
irr::video::EDT_OPENGL, // l'API est OpenGL
irr::core::dimension2d<irr::u32>(800,600), // taille de la fenetre 800x600
32, false, true, false, 0);
std::cout << "device :" << device << std::endl;
irr::video::IVideoDriver* driver =
device->getVideoDriver(); // creation driver
irr::scene::ISceneManager *sceneManager =
device->getSceneManager (); // creation scene manager
std::cout << "stop :" << sceneManager << std::endl;
sceneManager->addCameraSceneNode (0, // ajout camera fixe
irr::core::vector3df (0,0,0),
irr::core::vector3df (5,0,0));
std::cout << "coucou" << std::endl;
while (device->run()) { // la boucle de rendu
std::cout << "?" << std::endl;
driver->beginScene( // demarre le rendu
true, // clear back-buffer
true, // clear z-buffer
irr::video::SColor(255,255,255,255)); // fond blanc
sceneManager->drawAll (); // calcule le rendu
driver->endScene (); // affiche le rendu
}
device->drop ();
return 0;
} |
Partager