[intended behavior] Simple missed comment

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
Felyza
Posts: 9
Joined: Sun Aug 09, 2009 4:30 am

[intended behavior] Simple missed comment

Post by Felyza »

File: include\IrrCompileConfig.h

Relevant Section...

Code: Select all

Microsoft have chosen to remove D3D8 headers from their recent DXSDKs, and
so D3D8 support is now disabled by default.  If you really want to build
with D3D8 support, then you will have to source a DXSDK with the appropriate
headers, e.g. Summer 2004.  This is a Microsoft issue, not an Irrlicht one.
*/
#if defined(_IRR_WINDOWS_API_) && (!defined(__GNUC__) || defined(IRR_COMPILE_WITH_DX9_DEV_PACK))

//! Only define _IRR_COMPILE_WITH_DIRECT3D_8_ if you have an appropriate DXSDK, e.g. Summer 2004
#define _IRR_COMPILE_WITH_DIRECT3D_8_
#define _IRR_COMPILE_WITH_DIRECT3D_9_

#endif
The line...

Code: Select all

#define _IRR_COMPILE_WITH_DIRECT3D_8_
Should read...

Code: Select all

/*#define _IRR_COMPILE_WITH_DIRECT3D_8_*/
Based on the comment in the relevant section which states "D3D8 support is now disabled by default", as it is still enabled by default.

Not a biggie, when someone passes by the file its a 4 character change (two if you use //)
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Unless otherwise noted, the official SDK releases come with D3D8 support.
Jake-GR
Posts: 41
Joined: Wed Jan 07, 2009 12:32 am
Location: Colorado
Contact:

Post by Jake-GR »

doesnt all irrlicht releases support dx8, as long as you have the right direct x sdk?

just wondering because even the svn has that line commented by default. it has support for it, but doesnt mean its normally un-commented (many people dont have the right directx sdk)
Felyza
Posts: 9
Joined: Sun Aug 09, 2009 4:30 am

Post by Felyza »

hybrid wrote:Unless otherwise noted, the official SDK releases come with D3D8 support.
I have to point this out then...

From the official 1.5.1 release
(http://downloads.sourceforge.net/irrlic ... -1.5.1.zip)

in file .\include\IrrCompileConfig.h
lines 93 to 96
Official Source wrote: Microsoft have chosen to remove D3D8 headers from their recent DXSDKs, and
so D3D8 support is now disabled by default. If you really want to build
with D3D8 support, then you will have to source a DXSDK with the appropriate
headers, e.g. Summer 2004. This is a Microsoft issue, not an Irrlicht one.
Fixing this DOES NOT REMOVE DirectX 8 support from Irrlicht. It is (supposed to be, according to the source itself) disabled-by-default, and would be re-enabled by removing a comment from the appropriate line. This would be the best course of action as the programmer who knows to dig up old SDK's would be the one to be expected to remove a comment to re-enable the old SDK, rather than letting a person new to Irrlicht who obtains the latest source and SDK be stuck with a failed compile.

The reason this is a problem is if someone goes and downloads the newest DirectX SDK from the Microsoft site, and sets everything up right, regardless of compiler, the compile WILL fail.

It takes some understanding to know which release to get, which requires digging at Microsoft, or finding other packages on other sites, to get the OLD DirectX SDK which last included the DirectX 8 headers. The new ones simply do not include them.

---

In the event someone stumbles into this post and can't find where to flip the switch, grepping the source itself won't tell you where the define is made, you need to grep the include folder. ;)
Last edited by Felyza on Mon Aug 10, 2009 7:13 am, edited 1 time in total.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Felyza wrote:In the event someone stumbles into this post and can't find where to flip the switch, grepping the source itself won't tell you where the define is made, you need to grep the include folder. ;)
ORLY? You are not supposed to change the sources of Irrlicht in order to enable/disable some feature. All of this happens in IrrCompileConfig.h
So I doubt that anyone would search for a switch in the source folder. Moreover, the right SDK is mentioned at the same place where the disabling mention happens. Which makes people usually know both things or none. Anyway, the next major release might come with dx8 disabled by default, the 1.5.x releases will keep dx8 as is.
Felyza
Posts: 9
Joined: Sun Aug 09, 2009 4:30 am

Post by Felyza »

My apologies for sounding poorly, I'm really tired.

The only reason I pointed this out is...

1. The source comment says its disabled by default
2. It is not disabled by default

The source comment directly conflicts with actual state of the define.

Hence, bug.

I said (in message title) it wasn't a big bug, and was easily fixed.

Either deleting the comment that says it defaults to disabled OR commenting it so its disabled would be valid fixes to the concern.

Thank you.
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Felyza wrote:My apologies for sounding poorly, I'm really tired.

The only reason I pointed this out is...

1. The source comment says its disabled by default
2. It is not disabled by default

The source comment directly conflicts with actual state of the define.

Hence, bug.

I said (in message title) it wasn't a big bug, and was easily fixed.

Either deleting the comment that says it defaults to disabled OR commenting it so its disabled would be valid fixes to the concern.

Thank you.
Hey I'm sorry if you got a bad start on these forums. I personally think you make a good point in that the comment is wrong at the very least.

I think its a good idea to disable D3D8 as new users may encounter a compile error and not know where to look (Yes it may be obvious to some but coming from a developer that's a biased point of view).
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Post Reply