[SOURCE] wxIrrlicht Topic is solved

If you have a cool piece of software to share, but you are not hosting it officially yet, please dump it in here. If you have code snippets that are useful, please donate!
Post Reply
loptr
Earned some good credits
Earned some good credits
Posts: 110
Joined: Tue Jan 23, 2007 12:22 pm
Location: Kiel, Germany
Contact:

[SOURCE] wxIrrlicht

Post by loptr » Wed Dec 12, 2007 11:24 am

hi there!
keywords: irrlicht, 3dapp, 3dgraphics, 3dengine, graphics engine, 3d
after some experimenting with the source code provided by mandrav from the irrlicht-forums(see herefor details), i finally found a working solution i'd like to share with you (mandravs source always gave me linker errors). i didn't change much, though; basically, i left away the wxIrrlicht-event class and event notification.

the new wxIrrlicht class has been tested on windowsXP with the irrlicht-win32-example (creating a simple scene showing a rotating cube in front of a landscape) and worked great.

have fun developing your 3d-apps ;)

yours,
loptr

PS: moderators, feel free to edit or move this post as appropriate

[EDITS]reinserted url; inserted keyword for easier search; removed typos, updated header file (added #define);)[/EDITS]
Attachments
loptr_irrlicht.h
wxIrrlicht header file
(2.92 KiB) Downloaded 292 times
loptr_irrlicht.cpp
wxIrrlicht source file
(5.75 KiB) Downloaded 311 times
mainframe_h_cpp.txt
mainFrame source and header files (please seperate) for simple test...
(2.38 KiB) Downloaded 295 times
Last edited by loptr on Wed Dec 19, 2007 10:00 am, edited 7 times in total.
OS: Win XP PRO SP2 (fully updated)
proc: INTEL Core 2 Duo E6400
wx: wxDevCpp (always latest stable)

Jorg
Moderator
Moderator
Posts: 3971
Joined: Fri Aug 27, 2004 9:38 pm
Location: Delft, Netherlands
Contact:

Post by Jorg » Wed Dec 12, 2007 1:23 pm

Thanks, no need to move or edit. It seems to feel right at home here ;-)
- Jorgen
Forensic Software Engineer
Netherlands Forensic Insitute
http://english.forensischinstituut.nl/
-------------------------------------
Jorg's WasteBucket
http://www.xs4all.nl/~jorgb/wb

speculatius
In need of some credit
In need of some credit
Posts: 3
Joined: Sun Apr 06, 2008 7:42 pm

Post by speculatius » Mon Apr 07, 2008 1:58 pm

Hi,

I am using modified version of your code, and I had some troubles. You call device->run() in your render(). This is fragment of run() code from CIrrDeviceWin32.cpp:

Code: Select all

	while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
	{
		TranslateMessage(&msg);

		if (ExternalWindow && msg.hwnd == HWnd)
			WndProc(HWnd, msg.message, msg.wParam, msg.lParam);
		else
			DispatchMessage(&msg);

		if (msg.message == WM_QUIT)
			quit = true;
	}
I dont understand WinAPI, but it seems, that run() "steels" events from wxWidgets. So sometimes your wxIrrlicht miss some event. My solution is to call device->getTimer()->tick() instead. What do you think?

Post Reply