Yes i have version 1.6 of irrlicht.EDIT: Wait a minute... Did you upgrade the Irrlicht SDK to 1.6?
Phew...I finally managed to compile your code on linux, but unfortunately it doesn't run as it should, it looks like below, also there are error messages in the terminal
I didn't modify your code that much just got rid of the HWND and replaced it with WXWidget; also i deleted the code with HCURSOR(i think HCURSOR is windows only).Looking at the terminal errors maybe i am passing the wrong handle to param.WindowId ??.
Code: Select all
/*
#######################
modified in wxIrrlicht.h
#######################
*/
typedef WXWidget HWND;
Also to test if there are any problems with my wx libraries or irrlicht i made this simple(but poorly designed ) test app and it both compiles and runs just fine on my machine.
Code: Select all
#include <wx/wxprec.h>
#include <wx/wx.h>
#include <irrlicht.h>
#include <stdlib.h>
using namespace irr;
class HelloWorldApp : public wxApp
{
public:
virtual bool OnInit();
};
IMPLEMENT_APP(HelloWorldApp)
// This is executed upon startup, like 'main()' in non-wxWidgets programs.
bool HelloWorldApp::OnInit()
{
wxFrame *frame = new wxFrame((wxFrame*) NULL, -1, _T("Hello wxWidgets World"));
frame->SetDoubleBuffered(true);
frame->Show(true);
SetTopWindow(frame);
IrrlichtDevice* device = irr::createDevice(video::EDT_OPENGL,core::dimension2d<u32>(800,600),32);
if(!device)
Exit();
scene::ISceneManager* smgr = device->getSceneManager();
video::IVideoDriver* driver = device->getVideoDriver();
gui::IGUIEnvironment* guienv = device->getGUIEnvironment();
smgr->addCameraSceneNodeMaya();
scene::ILightSceneNode* light=smgr->addLightSceneNode(0,core::vector3df(130,120,1));
light->setLightType(video::ELT_POINT);
for(int i=1; i<500; ++i)
{
srand(i);
f32 t = static_cast<f32>(rand() % i + 1);
smgr->addCubeSceneNode(20,0,-1,core::vector3df(t,i,t+i))->setAutomaticCulling(scene::EAC_FRUSTUM_BOX);
}
gui::IGUIEditBox* txt = guienv->addEditBox(L"",core::rect<s32>(5,5,400,25));
int lastFPS = -1;
while(device->run())
{
driver->beginScene(true,true, video::SColor(255,100,101,140), frame->GetHandle());
smgr->drawAll();
guienv->drawAll();
driver->endScene();
int fps = driver->getFPS();
if (lastFPS != fps)
{
core::stringw str = L"FPS: ";
str += fps;
str += L" Drawn: " ;
str += driver->getPrimitiveCountDrawn();
txt->setText(str.c_str());
lastFPS = fps;
}
}
device->drop();
frame->Destroy();
Exit();
return true;
}