#include <irrlicht.h>
// Use namespaces
using namespace irr;
using namespace core;
using namespace video;
using namespace gui;
using namespace io;
using namespace scene;
int main()
{
// Create a new Irrlicht Device
IrrlichtDevice* Device = createDevice(
EDT_OPENGL, // Device type
dimension2d<s32>(800, 600), // Window dimensions
24, // Color depth
false, // Fullscreen
false, // Stencil buffer
false); // V-sync
// Retrieve the driver, scene manager, etc
IVideoDriver* Driver = Device->getVideoDriver();
ISceneManager* SceneManager = Device->getSceneManager();
IGUIEnvironment* GUIEnv = Device->getGUIEnvironment();
// Main loop
while (Device->run())
{
// Start the scene
Driver->beginScene(true, true, SColor(255, 0, 0, 0));
// Draw everything
SceneManager->drawAll();
GUIEnv->drawAll();
// End the scene
Driver->endScene();
}
// Drop the device
Device->drop();
return 0;
}
Last edited by Conquistador on Wed Feb 01, 2006 4:19 pm, edited 1 time in total.
opengl is not as good as direct3d (i'm talking about the irrlicht implementation) ... you should change it to direct3d because some beginners might be frustrated that it is not as fast, etc