Irrlicht x64 Windows...

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Post Reply
veegun
Posts: 59
Joined: Mon May 29, 2006 1:58 am

Irrlicht x64 Windows...

Post by veegun »

First off, thank you to the Irrlicht team! It has been a while since I attempted to build Irrlicht from source (2 years ago; but i've been visiting the forum almost every day and reading niko's blog). My, has it progressed over the years. :shock:

I tried it yesterday with the latest svn pull (rev 1872). While it still won't compile 'out of the box' without errors, it's a lot easier now to make a x64 build of Irrlicht for Windows (running Vista x64 SP1). I love it that you guys now include a 'Irrlicht9.0.sln' file for us VS2008 users.

I changed only two things:

1. changed the value for 'PreprocessorDefinitions' from 'WIN32' to 'WIN64'
2. changed X:\SDK\irrlicht_svn\source\Irrlicht\CIrrDeviceWin32.cpp:

Code: Select all


//! sets the caption of the window
void CIrrDeviceWin32::setWindowCaption(const wchar_t* text)
{
	DWORD dwResult;
	if (IsNonNTWindows)
	{
		const core::stringc s = text;
		SendMessageTimeout(HWnd, WM_SETTEXT, 0,
				reinterpret_cast<LPARAM>(s.c_str()),
				SMTO_ABORTIFHUNG, 2000, &dwResult);
	}
	else
		SendMessageTimeoutW(HWnd, WM_SETTEXT, 0,
				reinterpret_cast<LPARAM>(text),
				SMTO_ABORTIFHUNG, 2000, &dwResult);
}

to

Code: Select all


//! sets the caption of the window
void CIrrDeviceWin32::setWindowCaption(const wchar_t* text)
{
	DWORD dwResult;
	if (IsNonNTWindows)
	{
		const core::stringc s = text;
#ifdef WIN64
		SetWindowTextA(HWnd, s.c_str());
#else
        SendMessageTimeout(HWnd, WM_SETTEXT, 0,
				reinterpret_cast<LPARAM>(s.c_str()),
				SMTO_ABORTIFHUNG, 2000, &dwResult);
#endif
    }
	else
#ifdef WIN64
		SetWindowTextW(HWnd, text);
#else
		SendMessageTimeoutW(HWnd, WM_SETTEXT, 0,
				reinterpret_cast<LPARAM>(text),
				SMTO_ABORTIFHUNG, 2000, &dwResult);
#endif
}

to get around a compile error.

That's it! So I have one question, why isn't there a build configuration made for x64 windows yet in the official irrlicht releases?

I've also tried 3Demon (formerly Irrsphintz; SVN rev 120). I wanted to try out the DX10 feature mainly. But I could not get it to build for x64 windows for the life of me.

It seems that sphintz is using a very old irrlicht that brings in opengl lib from 'glu.h' whereas latest svn irrlicht uses 'glu.h' from windows sdk (not explicitly including 'glu.h' in project file).

Anyway, I gave up after getting an endless stream of errors. Also, 3Demon only comes with solution file that's for VS2005. I'm really not a fan of the VS conversion wizard. :evil:

Keep up the great work guys! I hope to have some stuff done in x64 irrlicht to show to the world soon. :wink:
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Yeah, sorry, but I don't think that we have a 64bit Windows machine for testing. So it's hard to get the correct setup.
The window caption method has been changed only recently, in order to get around problems with multi-threaded apps. Looks like we have to check some more in MSDN :wink:
Anyway, thanks for your compliments, we try to give our best :D
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

I'm actually on XP 64 at home, so I could support this. It's just that we already have so many Windows builds and variants that just keeping on top of the existing ones eats up a significant amount of time.

That said, I'll give this a try and look at folding it into the Windows builds.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
veegun
Posts: 59
Joined: Mon May 29, 2006 1:58 am

Post by veegun »

@hybrid: It was complaining about a pointer in the last parameter (number 7; &dwResult).

That's great that you guys are making Irrlicht multi-threaded as possible (I have a quad core intel Q6600 processor).

@rogerborg: I can help you test if you want and provide feedback from a Vista x64 SP1 user. I've already re-built and run all of the examples (except for the mobile one) to run under x64 Irrlicht.

None of the examples seem to run with DX8. The examples that uses shaders doesn't seem to display correctly when run under DX9 but does look correct under OpenGL. I think it's because the shader version that's currently in Irrlicht (pixel shader 1.0/1.1?) is not supported any longer in latest DX Nov 2008 SDK. It mentions about changing some value to run in legacy mode for the shader. I'm not sure if it's just a build switch or something more drastic.

Also, some of the triangle rendering examples have missing sides when run in software mode. Software mode should be independent of discrete graphic card so I don't know why the sides are missing. I'll post a screen cap later.

Oh, yeah. I have an Nvidia 8800 GT 512 MB discrete graphic card.
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

veegun wrote:That's great that you guys are making Irrlicht multi-threaded as possible (I have a quad core intel Q6600 processor).
That's news to me. One thread to rule them all, is what I thought.

veegun wrote:@rogerborg: I can help you test if you want and provide feedback from a Vista x64 SP1 user. I've already re-built and run all of the examples (except for the mobile one) to run under x64 Irrlicht.
Any info that you can provide would be gratefully received, but it's the long term maintenance that concerns me.
veegun wrote:Also, some of the triangle rendering examples have missing sides when run in software mode.
That's an inherent issue with the software driver, which provides the most baseline functionality. BURNINGSVIDEO is generally much better.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Well, the threading problems won't come from internal Irrlicht threading, as that's not intended. But the problem is that the basic window creation might have happened in a different thread, which would raise problems with the caption setting.
The problems with dx8 are due to it being disabled and not supported by more recent DX SDKs, but the official Irrlicht SDKs are usually built with older SDKs, hence support both pixel shader 1.1 and DX8.
veegun
Posts: 59
Joined: Mon May 29, 2006 1:58 am

Post by veegun »

Hi all,

I would like to post my experience building the latest irrlicht svn (rev 2402) for x64 windows platform (Vista x64 SP2).

Thanks for making the changes to irrlicht to make it more x64 friendly.

Here's the needed steps to get irrlicht to build for x64 windows platform:

1. Change 'WIN32' to 'WIN64' in 'C/C++->Preprocessor->Preprocessor Definitions' (VS 2008 SP1 paired with DX SDK March 2009). This step is needed to get around the following errors:

Code: Select all


Error	8	error C2664: 'SendMessageTimeoutA' : cannot convert parameter 7 from 'DWORD *' to 'PDWORD_PTR'	d:\SDK\irrlicht_svn\source\Irrlicht\CIrrDeviceWin32.cpp	568
Error	9	error C2664: 'SendMessageTimeoutW' : cannot convert parameter 7 from 'DWORD *' to 'PDWORD_PTR'	d:\SDK\irrlicht_svn\source\Irrlicht\CIrrDeviceWin32.cpp	578

2. Remove '/MACHINE:I386' from 'Linker->Command Line'. This step is needed to get around the following errors:

Code: Select all


Error	1	fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'	d:\SDK\irrlicht_svn\work\debug64\CDefaultSceneNodeAnimatorFactory.obj	1

Now you're done! Well, except for the 48 warning messages :D :

Code: Select all


Warning	1	warning C4267: 'argument' : conversion from 'size_t' to 'irr::u32', possible loss of data	d:\SDK\irrlicht_svn\source\Irrlicht\CXMLWriter.cpp	57
Warning	2	warning C4267: 'argument' : conversion from 'size_t' to 'irr::u32', possible loss of data	d:\SDK\irrlicht_svn\source\Irrlicht\CXMLWriter.cpp	85
Warning	3	warning C4267: 'argument' : conversion from 'size_t' to 'irr::u32', possible loss of data	d:\SDK\irrlicht_svn\source\Irrlicht\CXMLWriter.cpp	124
Warning	4	warning C4267: 'argument' : conversion from 'size_t' to 'irr::u32', possible loss of data	d:\SDK\irrlicht_svn\source\Irrlicht\CXMLWriter.cpp	150
Warning	5	warning C4267: 'argument' : conversion from 'size_t' to 'irr::u32', possible loss of data	d:\SDK\irrlicht_svn\source\Irrlicht\CXMLWriter.cpp	184
Warning	6	warning C4267: 'return' : conversion from 'size_t' to 'irr::s32', possible loss of data	d:\SDK\irrlicht_svn\source\Irrlicht\CWriteFile.cpp	49
Warning	7	warning C4244: '=' : conversion from 'intptr_t' to 'long', possible loss of data	d:\SDK\irrlicht_svn\source\Irrlicht\CFileList.cpp	64
Warning	8	warning C4101: 'dwResult' : unreferenced local variable	d:\SDK\irrlicht_svn\source\Irrlicht\CIrrDeviceWin32.cpp	559
Warning	9	warning C4244: 'argument' : conversion from 'LONG_PTR' to 'DWORD', possible loss of data	d:\SDK\irrlicht_svn\source\Irrlicht\CIrrDeviceWin32.cpp	916
Warning	10	warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data	d:\SDK\irrlicht_svn\source\Irrlicht\libpng\pngwutil.c	183
Warning	11	warning C4267: '=' : conversion from 'size_t' to 'png_uint_32', possible loss of data	d:\SDK\irrlicht_svn\source\Irrlicht\libpng\pngwutil.c	1556
Warning	12	warning C4267: '=' : conversion from 'size_t' to 'png_uint_32', possible loss of data	d:\SDK\irrlicht_svn\source\Irrlicht\libpng\pngwio.c	53
Warning	13	warning C4996: 'fileno': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _fileno. See online help for details.	d:\SDK\irrlicht_svn\source\Irrlicht\libpng\pngwio.c	140
Warning	14	warning C4267: '=' : conversion from 'size_t' to 'png_uint_32', possible loss of data	d:\SDK\irrlicht_svn\source\Irrlicht\libpng\pngset.c	350
Warning	15	warning C4267: '=' : conversion from 'size_t' to 'png_uint_32', possible loss of data	d:\SDK\irrlicht_svn\source\Irrlicht\libpng\pngset.c	367
Warning	16	warning C4267: '=' : conversion from 'size_t' to 'png_uint_32', possible loss of data	d:\SDK\irrlicht_svn\source\Irrlicht\libpng\pngset.c	394
Warning	17	warning C4267: '=' : conversion from 'size_t' to 'png_uint_32', possible loss of data	d:\SDK\irrlicht_svn\source\Irrlicht\libpng\pngset.c	657
Warning	18	warning C4267: '=' : conversion from 'size_t' to 'png_uint_32', possible loss of data	d:\SDK\irrlicht_svn\source\Irrlicht\libpng\pngset.c	974
Warning	19	warning C4267: 'function' : conversion from 'size_t' to 'png_uint_32', possible loss of data	d:\SDK\irrlicht_svn\source\Irrlicht\libpng\pngrutil.c	254
Warning	20	warning C4267: 'function' : conversion from 'size_t' to 'png_uint_32', possible loss of data	d:\SDK\irrlicht_svn\source\Irrlicht\libpng\pngrutil.c	280
Warning	21	warning C4267: 'function' : conversion from 'size_t' to 'png_uint_32', possible loss of data	d:\SDK\irrlicht_svn\source\Irrlicht\libpng\pngrutil.c	350
Warning	22	warning C4267: '=' : conversion from 'size_t' to 'png_uint_32', possible loss of data	d:\SDK\irrlicht_svn\source\Irrlicht\libpng\pngrutil.c	1070
Warning	23	warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data	d:\SDK\irrlicht_svn\source\Irrlicht\libpng\pngrutil.c	1169
Warning	24	warning C4267: 'function' : conversion from 'size_t' to 'png_uint_32', possible loss of data	d:\SDK\irrlicht_svn\source\Irrlicht\libpng\pngrutil.c	3190
Warning	25	warning C4267: '=' : conversion from 'size_t' to 'png_uint_32', possible loss of data	d:\SDK\irrlicht_svn\source\Irrlicht\libpng\pngrutil.c	3192
Warning	26	warning C4267: '-=' : conversion from 'size_t' to 'png_uint_32', possible loss of data	d:\SDK\irrlicht_svn\source\Irrlicht\libpng\pngpread.c	529
Warning	27	warning C4267: '-=' : conversion from 'size_t' to 'png_uint_32', possible loss of data	d:\SDK\irrlicht_svn\source\Irrlicht\libpng\pngpread.c	545
Warning	28	warning C4267: '-=' : conversion from 'size_t' to 'png_uint_32', possible loss of data	d:\SDK\irrlicht_svn\source\Irrlicht\libpng\pngpread.c	710
Warning	29	warning C4267: '-=' : conversion from 'size_t' to 'png_uint_32', possible loss of data	d:\SDK\irrlicht_svn\source\Irrlicht\libpng\pngpread.c	733
Warning	30	warning C4267: 'function' : conversion from 'size_t' to 'png_uint_32', possible loss of data	d:\SDK\irrlicht_svn\source\Irrlicht\libpng\pngpread.c	1282
Warning	31	warning C4267: '+=' : conversion from 'size_t' to 'long', possible loss of data	d:\SDK\irrlicht_svn\source\Irrlicht\jpeglib\jmemmgr.c	306
Warning	32	warning C4267: '+=' : conversion from 'size_t' to 'long', possible loss of data	d:\SDK\irrlicht_svn\source\Irrlicht\jpeglib\jmemmgr.c	366
Warning	33	warning C4267: '-=' : conversion from 'size_t' to 'long', possible loss of data	d:\SDK\irrlicht_svn\source\Irrlicht\jpeglib\jmemmgr.c	976
Warning	34	warning C4267: '-=' : conversion from 'size_t' to 'long', possible loss of data	d:\SDK\irrlicht_svn\source\Irrlicht\jpeglib\jmemmgr.c	990
Warning	35	warning C4267: 'argument' : conversion from 'size_t' to 'UINT', possible loss of data	d:\SDK\irrlicht_svn\source\Irrlicht\CD3D9ShaderMaterialRenderer.cpp	180
Warning	36	warning C4267: 'argument' : conversion from 'size_t' to 'UINT', possible loss of data	d:\SDK\irrlicht_svn\source\Irrlicht\CD3D9ShaderMaterialRenderer.cpp	239
Warning	37	warning C4267: 'argument' : conversion from 'size_t' to 'UINT', possible loss of data	d:\SDK\irrlicht_svn\source\Irrlicht\CD3D9HLSLMaterialRenderer.cpp	102
Warning	38	warning C4267: 'argument' : conversion from 'size_t' to 'UINT', possible loss of data	d:\SDK\irrlicht_svn\source\Irrlicht\CD3D9HLSLMaterialRenderer.cpp	189
Warning	39	warning C4244: '=' : conversion from '__int64' to 'irr::s32', possible loss of data	d:\SDK\irrlicht_svn\source\Irrlicht\CImageLoaderRGB.cpp	559
Warning	40	warning C4267: 'argument' : conversion from 'size_t' to 'irr::u32', possible loss of data	d:\SDK\irrlicht_svn\source\Irrlicht\CImageLoaderPNG.cpp	41
Warning	41	warning C4267: 'argument' : conversion from 'size_t' to 'irr::u32', possible loss of data	d:\SDK\irrlicht_svn\source\Irrlicht\CImageWriterPNG.cpp	47
Warning	42	warning C4267: 'initializing' : conversion from 'size_t' to 'const irr::s32', possible loss of data	d:\SDK\irrlicht_svn\source\Irrlicht\CImageWriterJPG.cpp	75
Warning	43	warning C4267: 'argument' : conversion from 'size_t' to 'GLsizei', possible loss of data	d:\SDK\irrlicht_svn\source\Irrlicht\COpenGLShaderMaterialRenderer.cpp	182
Warning	44	warning C4267: 'argument' : conversion from 'size_t' to 'GLsizei', possible loss of data	d:\SDK\irrlicht_svn\source\Irrlicht\COpenGLShaderMaterialRenderer.cpp	226
Warning	45	warning C4267: 'argument' : conversion from 'size_t' to 'irr::u32', possible loss of data	d:\SDK\irrlicht_svn\source\Irrlicht\CPLYMeshWriter.cpp	131
Warning	46	warning C4267: 'argument' : conversion from 'size_t' to 'irr::u32', possible loss of data	d:\SDK\irrlicht_svn\source\Irrlicht\CPLYMeshWriter.cpp	166
Warning	47	warning C4244: 'initializing' : conversion from '__int64' to 'irr::u32', possible loss of data	d:\SDK\irrlicht_svn\source\Irrlicht\CPLYMeshFileLoader.cpp	452
Warning	48	warning C4244: '=' : conversion from '__int64' to 'irr::s32', possible loss of data	d:\SDK\irrlicht_svn\source\Irrlicht\CPLYMeshFileLoader.cpp	626

Post Reply