Advertisement
Guest User

Untitled

a guest
Sep 20th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.82 KB | None | 0 0
  1. #include <irrlicht/irrlicht.h>
  2.  
  3. using namespace irr;
  4.  
  5. int main()
  6. {
  7.     IrrlichtDevice* device = createDevice( video::EDT_OPENGL );
  8.    
  9.     scene::ISceneManager* scene = device->getSceneManager();
  10.     video::IVideoDriver* video = device->getVideoDriver();
  11.    
  12.     scene::ICameraSceneNode* cam = scene->addCameraSceneNodeFPS();
  13.    
  14.     scene::ISceneNode* box = scene->addCubeSceneNode();
  15.     video::ITexture* tex = video->getTexture( "tex.png" );
  16.     box->setMaterialTexture(0, tex);
  17.     box->setMaterialFlag( video::EMF_LIGHTING, true );
  18.    
  19.     scene::ILightSceneNode* light = scene->addLightSceneNode(NULL, core::vector3df( -10, 10, -10 ) );
  20.    
  21.     while( device->run() )
  22.     {
  23.         video->beginScene( true, true, video::SColor( 255, 0, 0, 255 ) );
  24.        
  25.         scene->drawAll();
  26.        
  27.         video->endScene();
  28.        
  29.         device->yield();
  30.     }
  31.    
  32.     device->drop();
  33.    
  34.     return 0;
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement