Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <irrlicht/irrlicht.h>
- using namespace irr;
- int main()
- {
- IrrlichtDevice* device = createDevice( video::EDT_OPENGL );
- scene::ISceneManager* scene = device->getSceneManager();
- video::IVideoDriver* video = device->getVideoDriver();
- scene::ICameraSceneNode* cam = scene->addCameraSceneNodeFPS();
- scene::ISceneNode* box = scene->addCubeSceneNode();
- video::ITexture* tex = video->getTexture( "tex.png" );
- box->setMaterialTexture(0, tex);
- box->setMaterialFlag( video::EMF_LIGHTING, true );
- scene::ILightSceneNode* light = scene->addLightSceneNode(NULL, core::vector3df( -10, 10, -10 ) );
- while( device->run() )
- {
- video->beginScene( true, true, video::SColor( 255, 0, 0, 255 ) );
- scene->drawAll();
- video->endScene();
- device->yield();
- }
- device->drop();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement