I've tried everything I can think of; does anyone have any ideas? Thanks in advance
Code: Select all
#include <cstdlib>
#include <iostream>
#include <irrlicht.h>
using namespace std;
using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;
#pragma comment(lib, "Irrlicht.lib")
int main(int argc, char *argv[])
{
IrrlichtDevice *device =
createDevice( video::EDT_SOFTWARE2, dimension2d<s32>(640, 480), 16,
false, false, false, 0);
device->setWindowCaption(L"Procedural Texture Viewer");
IVideoDriver* driver = device->getVideoDriver();
ISceneManager* smgr = device->getSceneManager();
IGUIEnvironment* guienv = device->getGUIEnvironment();
ISceneNode* node = smgr->addCubeSceneNode(10, NULL, 1, vector3df(0, 0, 0));
smgr->addCameraSceneNode(0, vector3df(0,0,-15), vector3df(0,0,0));
driver->setTextureCreationFlag(ETCF_CREATE_MIP_MAPS, false);
ITexture *t2 = driver->getTexture("eh.bmp");
node->setMaterialTexture(0, t2);
node->setMaterialFlag(video::EMF_LIGHTING, false);
node->setMaterialFlag(video::EMF_ANISOTROPIC_FILTER, false);
node->setMaterialFlag(video::EMF_BILINEAR_FILTER, false);
node->setMaterialFlag(video::EMF_TRILINEAR_FILTER, false);
node->setMaterialFlag(video::EMF_GOURAUD_SHADING, false);
while(device->run())
{
driver->beginScene(true, true, SColor(255,100,101,140));
smgr->drawAll();
guienv->drawAll();
driver->endScene();
}
device->drop();
system("PAUSE");
return EXIT_SUCCESS;
}