Now onto the problem, when I run the .exe from the compile nothing will happen. I'm guessing that is because I don't have a function called inside of WinMain to start up Irrlicht, though when I've tried to call my function to start it - RBGame::run() - I get compile errors. I've posted some of the code below, if any one could help this would be greatly appericiated.
Code: Select all
int WINAPI WinMain(HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT)
{
video::EDriverType driverType = video::EDT_DIRECTX9;
return 0;
}
Code: Select all
class RBGame : public IEventReceiver
{
public:
void run();
};
Code: Select all
void RBGame::run()
{
IrrlichtDevice* device = createDevice(video::EDT_DIRECTX9, dimension2d<s32>(800,600), 16, false, true, 0);
video::IVideoDriver* driver = device -> getVideoDriver();
scene::ISceneManager* smgr = device -> getSceneManager();
gui::IGUIEnvironment* guienv = device -> getGUIEnvironment();
//--------------------------------------------------
// Device Setup
//--------------------------------------------------
device -> setWindowCaption(L"Mini-Project - v0.1");
//--------------------------------------------------
// Interface Setup
//--------------------------------------------------
//Some of my code
//--------------------------------------------------
// Render Loop
//--------------------------------------------------
while(device->run())
{
driver -> beginScene(true, true, SColor(100,100,100,100));
smgr -> drawAll();
guienv -> drawAll();
driver -> endScene();
}
device -> drop();
}