Page 2 of 3
Posted: Sun Nov 20, 2005 8:15 pm
by Guest
i dont care, visual c++ 2005 express is so freaking cool!! i even send him some data when i installed it and registered (you dont have to, my own decision).
if you get something for free, you could at least give something back. so i gave them the useless information they wanted.
i think more and more everyday that visual c++ is the best f*cking piece of software on the whole planet
ps: does anyone know if i can use irrlicht with the windows forms? i mean a .net2 app with irrlicht inside, like an editor. if not, i start crying because that would suck like hell!!!
Posted: Sun Nov 20, 2005 8:45 pm
by cpprules
GFXstyLER wrote:
i think more and more everyday that visual c++ is the best f*cking piece of software on the whole planet
Have to agree with that.
First i thought that VS sucks, and i was using DevC++. But soon...
My skin started to turn red...
My soul started to burn...
And i liked Visual C++
Posted: Sun Nov 20, 2005 8:47 pm
by Guest
My skin started to turn red...
My soul started to burn...
And i liked Visual C++
looool !!!
Posted: Sun Nov 20, 2005 10:13 pm
by SomeGuy
Yeap. Plain nutz. Dudes, I was only trying to give you a small impulse to open yer eyes and say "NO" to the chip (and/or any other wierd mass devices promoted by MS or any other company for that matter)
Bye
BTW VC++ does not suck. VC++ IDE SUCKS
Posted: Tue Nov 22, 2005 12:57 pm
by cpprules
VC++ IDE !SUCKS
Posted: Tue Nov 22, 2005 2:32 pm
by boboS
ps: does anyone know if i can use irrlicht with the windows forms? i mean a .net2 app with irrlicht inside, like an editor. if not, i start crying because that would suck like hell!!!
Is posible (as I saw in the win32 example ) but I dont know how.
Posted: Tue Nov 22, 2005 2:53 pm
by Guest
i already got it to work and its really nice
i just tried it and did some research about windows.forms. if someone needs a tip on how to do it, drop me a line
Posted: Tue Nov 22, 2005 3:04 pm
by boboS
Well I also tried doing this..... and no result.
So....I need a tip!
Posted: Tue Nov 22, 2005 5:47 pm
by Guest
so well, here you go:
1. load your windows forms project in VC++
2. create a panel where you want to draw irrlicht in. you can also draw irrlicht in the main panel (which is what i do) but it does not work if you create irrlicht on application start. you have to wait until the main window is created and the n use irrlicht with it. but this is not a problem since i do not load irrlicht on application startup, but when "File/New File..." is clicked.
3. for irrlicht you have to specify a HWND to draw in, which you dont have in windows.forms. so you must take a certain object where you want to draw irrlicht in and take its handle, like this:
Code: Select all
irr::SIrrlichtCreationParameters param;
param.WindowId = (s32)yourobject->Handle.ToPointer();
// for the main window this would be:
//param.WindowId = (s32)this->Handle.ToPointer();
4. then continiue loading irrlicht like in the win32 tutorial. here is an example of how to load it:
Code: Select all
// put this somewhere in the class
IrrlichtDevice* RenderDevice;
IVideoDriver* VideoDriver;
ISceneManager* SceneManager;
bool RenderingEnabled;
//put this somewhere in your class, too:
private: void initIrrlicht()
{
if(!RenderDevice)
{
irr::SIrrlichtCreationParameters param;
param.WindowId = (s32)this->Handle.ToPointer();
param.DriverType = video::EDT_OPENGL;
RenderDevice = createDeviceEx(param);
SceneManager = RenderDevice->getSceneManager();
VideoDriver = RenderDevice->getVideoDriver();
RenderingEnabled = true;
while (RenderDevice->run())
{
if(RenderingEnabled == true)
{
VideoDriver->beginScene(true, true, SColor(255, 255, 0, 0));
SceneManager->drawAll();
VideoDriver->endScene();
}
Sleep(1);
}
RenderDevice->closeDevice();
RenderDevice->drop();
}
}
i put a "Sleep(1);" in the while loop because then the editor takes only 1% cpu usage, which is good because you dont want an editor to run on 50% cpu usage all the time.
now make a button for example with the label "Start Irrlicht" and make it load "initIrrlicht();"
last note: when you do an editor its better for you to create a few classes because if you put everything in one .H file it will get messy pretty soon.
hope that helped you
Posted: Tue Nov 22, 2005 7:18 pm
by boboS
Thanks man, you're the man, man!
Posted: Wed Nov 23, 2005 5:57 pm
by BillGaytes
If you hate me, why have you chosen my compiler and IDE?...
Posted: Sun Dec 04, 2005 3:52 am
by Guest
THe code seems to compile fine, but I keep getting a linker error when setting the device:
device = createDeviceEx(param);
The error is:
Code: Select all
irr-win32.obj : error LNK2001: unresolved external symbol "class irr::IrrlichtDevice * __clrcall irr::createDeviceEx(struct irr::SIrrlichtCreationParameters const &)" (?createDeviceEx@irr@@$$FYMPAVIrrlichtDevice@1@ABUSIrrlichtCreationParameters@1@@Z)
I am pointing to the correct headers and libraries (0.14.0), it is driving me crazy.
Posted: Sun Dec 04, 2005 4:07 am
by Guest
I should have posted that the peram is a "lable" container.
Posted: Sun Dec 04, 2005 4:09 am
by Quall
god damnit. I keep forgetting to log in. THe container is not a label, it is a panel.
Posted: Sun Dec 04, 2005 11:18 am
by Guest
i got that too. it seems that some microshit stuff is also named "param" so change the name of the SIrrlichtCreationParameters to _param or parameters and the linker error will be gone