Finally, a DirectX 10 video driver for Irrlicht

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
Granyte
Posts: 850
Joined: Tue Jan 25, 2011 11:07 pm
Contact:

Re: Finally, a DirectX 10 video driver for Irrlicht

Post by Granyte »

the chequout option is available in your windows right click menu once tortoise svn is installed
robmar
Posts: 1125
Joined: Sun Aug 14, 2011 11:30 pm

Re: Finally, a DirectX 10 video driver for Irrlicht

Post by robmar »

Okay that worked, but where have the files been stored because they aren´t in my repository folder?
robmar
Posts: 1125
Joined: Sun Aug 14, 2011 11:30 pm

Re: Finally, a DirectX 10 video driver for Irrlicht

Post by robmar »

Okay found them in another directory!

Compiled right up to the end then this error:-

1> Creating library ..\..\lib\Win32-visualstudio\Irrlicht.lib and object ..\..\lib\Win32-visualstudio\Irrlicht.exp
1>CIrrDeviceWin32.obj : error LNK2019: unresolved external symbol "class irr::video::IVideoDriver * __cdecl irr::video::createDirectX11Driver(struct irr::SIrrlichtCreationParameters const &,class irr::io::IFileSystem *,struct HWND__ *)" (?createDirectX11Driver@video@irr@@YAPAVIVideoDriver@12@ABUSIrrlichtCreationParameters@2@PAVIFileSystem@io@2@PAUHWND__@@@Z) referenced in function "private: void __thiscall irr::CIrrDeviceWin32::createDriver(void)" (?createDriver@CIrrDeviceWin32@irr@@AAEXXZ)
1>..\..\bin\Win32-visualstudio\Irrlicht.dll : fatal error LNK1120: 1 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Granyte
Posts: 850
Joined: Tue Jan 25, 2011 11:07 pm
Contact:

Re: Finally, a DirectX 10 video driver for Irrlicht

Post by Granyte »

I had the same issue if i'm not mistaken it's due to this function missing at the end of the dx11 driver file

Code: Select all

namespace irr
{
namespace video
{
 
#ifdef _IRR_COMPILE_WITH_DIRECT3D_11_
//! creates a video driver
IVideoDriver* createDirectX11Driver(const irr::SIrrlichtCreationParameters& params,
            io::IFileSystem* io, HWND window)
{
    CD3D11Driver* dx11 = new CD3D11Driver(params,io, window);
    if (!dx11->initDriver(window, false))
    {
        dx11->drop();
        dx11 = 0;
    }
 
    return dx11;
}
#endif // _IRR_COMPILE_WITH_DIRECT3D_11_
 
} // end namespace video
} // end namespace irr
zerochen
Posts: 273
Joined: Wed Jan 07, 2009 1:17 am
Location: Germany

Re: Finally, a DirectX 10 video driver for Irrlicht

Post by zerochen »

but why it is missing? at least it is in the svn branch

http://sourceforge.net/p/irrlicht/code/ ... .cpp#l3579

granyte:
why your patch is removing D3D_FEATURE_LEVEL_11_1?

also cant we use for that

Code: Select all

+   IDirect3DDevice9* Device; 
+   union
+   {
+       IDirect3DTexture9* Texture;
+       IDirect3DVolumeTexture9* VolumeTexture;
+       IDirect3DCubeTexture9* CubeTexture;
+
+       IDirect3DBaseTexture9* BaseTexture;
+   }Texture;
just the IDirect3DBaseTexture9* BaseTexture and cast it to the right one?
i guess it would reduce the code.

isn it better if we put this D3DXSHADER_OPTIMIZATION_LEVEL3 in CD3D9HLSLMaterialRenderer in the release build?

what does that do? is it maybe your code and doesnt belongs to the patch?

Code: Select all

+   flags |= D3DXSHADER_OPTIMIZATION_LEVEL3;
+   if(strcmp("pixelNoiseMain",shaderEntryPointName))
+   {
+       flags |= D3DXSHADER_AVOID_FLOW_CONTROL;
+   }else 
+   {
+       flags |= D3DXSHADER_PREFER_FLOW_CONTROL;
+   }

regards
zerochen
robmar
Posts: 1125
Joined: Sun Aug 14, 2011 11:30 pm

Re: Finally, a DirectX 10 video driver for Irrlicht

Post by robmar »

I see the problem now, I loaded the VS10 proj, and it doesn´t have the DX11 driver in it.

I loaded the VS11 project version, had to set it to V100 as only have VS 2010, but hundreds of errors now!
Granyte
Posts: 850
Joined: Tue Jan 25, 2011 11:07 pm
Contact:

Re: Finally, a DirectX 10 video driver for Irrlicht

Post by Granyte »

zerochen wrote:but why it is missing? at least it is in the svn branch

http://sourceforge.net/p/irrlicht/code/ ... .cpp#l3579
oh this has been fixed cool we just need to fix the projects files
zerochen wrote: granyte:
why your patch is removing D3D_FEATURE_LEVEL_11_1?
i'm commenting 11.1 because the windows 8 sdk will not install directx on my system no mather what I do it just won't
but I guess I should have gone the full way and put it into a preprocessor command so people can switch it at will
zerochen wrote: also cant we use for that

Code: Select all

+   IDirect3DDevice9* Device; 
+   union
+   {
+       IDirect3DTexture9* Texture;
+       IDirect3DVolumeTexture9* VolumeTexture;
+       IDirect3DCubeTexture9* CubeTexture;
+
+       IDirect3DBaseTexture9* BaseTexture;
+   }Texture;
just the IDirect3DBaseTexture9* BaseTexture and cast it to the right one?
i guess it would reduce the code.
the dx9 texture implementation is mostly experimental / proof of concept but ya there is several places where it can be optimised or done better
zerochen wrote: isn it better if we put this D3DXSHADER_OPTIMIZATION_LEVEL3 in CD3D9HLSLMaterialRenderer in the release build?

what does that do? is it maybe your code and doesnt belongs to the patch?

Code: Select all

+   flags |= D3DXSHADER_OPTIMIZATION_LEVEL3;
+   if(strcmp("pixelNoiseMain",shaderEntryPointName))
+   {
+       flags |= D3DXSHADER_AVOID_FLOW_CONTROL;
+   }else 
+   {
+       flags |= D3DXSHADER_PREFER_FLOW_CONTROL;
+   }

traditionaly irrlicht use D3DXSHADER_OPTIMIZATION_LEVEL3 | D3DXSHADER_AVOID_FLOW_CONTROL when compiling shaders
but I my noise shader fail to compile when using AVOID and because flags are not exposed I cheated it this way but maybe we should make it detext if "_FlowControl" is at the end of the entry function name and have this flag exposed this way? maybe we could expose some other flags to this way
robmar
Posts: 1125
Joined: Sun Aug 14, 2011 11:30 pm

Re: Finally, a DirectX 10 video driver for Irrlicht

Post by robmar »

I´ve installed the DX10 June SDK, the Windows 8.1 SDK, I use VS 2010, there is no V110 option so I´m using V100.

I get these errors:

1>------ Build started: Project: Irrlicht, Configuration: Debug Win32 ------
1> CD3D11Driver.cpp
1>d:\repirrwc\source\irrlicht\CD3D11MaterialRenderer.h(236): error C2065: 'D3D_SHADER_MACRO' : undeclared identifier
1>d:\repirrwc\source\irrlicht\CD3D11MaterialRenderer.h(238): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>d:\repirrwc\source\irrlicht\CD3D11MaterialRenderer.h(238): error C2143: syntax error : missing ',' before '*'
1>d:\repirrwc\source\irrlicht\CD3D11MaterialRenderer.h(259): error C2143: syntax error : missing ';' before '*'
1>d:\repirrwc\source\irrlicht\CD3D11MaterialRenderer.h(259): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>d:\repirrwc\source\irrlicht\CD3D11MaterialRenderer.h(259): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>d:\repirrwc\source\irrlicht\CD3D11FixedPipelineRenderer.h(71): error C2143: syntax error : missing ';' before '*'
1>d:\repirrwc\source\irrlicht\CD3D11FixedPipelineRenderer.h(71): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>d:\repirrwc\source\irrlicht\CD3D11FixedPipelineRenderer.h(71): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>d:\repirrwc\source\irrlicht\CD3D11FixedPipelineRenderer.h(72): error C2143: syntax error : missing ';' before '*'
1>d:\repirrwc\source\irrlicht\CD3D11FixedPipelineRenderer.h(72): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>d:\repirrwc\source\irrlicht\CD3D11FixedPipelineRenderer.h(72): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>d:\repirrwc\source\irrlicht\CD3D11FixedPipelineRenderer.h(73): error C2143: syntax error : missing ';' before '*'
1>d:\repirrwc\source\irrlicht\CD3D11FixedPipelineRenderer.h(73): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>d:\repirrwc\source\irrlicht\CD3D11FixedPipelineRenderer.h(73): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>CD3D11Driver.cpp(302): error C2065: 'D3D_FEATURE_LEVEL_11_1' : undeclared identifier
1>CD3D11Driver.cpp(323): error C2065: 'D3D_FEATURE_LEVEL_11_1' : undeclared identifier
1>CD3D11Driver.cpp(2566): error C2065: 'D3D_FEATURE_LEVEL_11_1' : undeclared identifier
1>CD3D11Driver.cpp(2566): error C2051: case expression not constant
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Granyte
Posts: 850
Joined: Tue Jan 25, 2011 11:07 pm
Contact:

Re: Finally, a DirectX 10 video driver for Irrlicht

Post by Granyte »

IF the windows 8.1 sdk properly installed the dx files you need to point at it's directory

If it did like it did for me and refused to install the dx files you need to comment the reference to dx11.1
robmar
Posts: 1125
Joined: Sun Aug 14, 2011 11:30 pm

Re: Finally, a DirectX 10 video driver for Irrlicht

Post by robmar »

Coment the references?
mongoose7
Posts: 1227
Joined: Wed Apr 06, 2011 12:13 pm

Re: Finally, a DirectX 10 video driver for Irrlicht

Post by mongoose7 »

Comment *out* the references with:

#ifdef UNUSED
..
#endif
robmar
Posts: 1125
Joined: Sun Aug 14, 2011 11:30 pm

Re: Finally, a DirectX 10 video driver for Irrlicht

Post by robmar »

I added the include for the DX10 2010 SDK, although there is a $(DXSDK_DIR)Include there, and I still get this error:-

1>------ Build started: Project: Irrlicht, Configuration: Debug Win32 ------
1> CCgMaterialRenderer.cpp
1> CD3D11CallBridge.cpp
1>d:\repirrwc\source\irrlicht\CD3D11MaterialRenderer.h(236): error C2065: 'D3D_SHADER_MACRO' : undeclared identifier

Weird though as when I "F12" the macro name, 'D3D_SHADER_MACRO' , it opens the file to show the macro, so why isn´t it declared, I mean its not grey.out!

There are more errors, such as ID3DBlob not declared, but again when I "F12" it lists up!
robmar
Posts: 1125
Joined: Sun Aug 14, 2011 11:30 pm

Re: Finally, a DirectX 10 video driver for Irrlicht

Post by robmar »

Has anyone compiled this version with VS 2010?

I´d like to start testing some patches I´ve developed, so appreciate any assistance.
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: Finally, a DirectX 10 video driver for Irrlicht

Post by hendu »

That sounds bad if you didn't even compile-test your patches before...
robmar
Posts: 1125
Joined: Sun Aug 14, 2011 11:30 pm

Re: Finally, a DirectX 10 video driver for Irrlicht

Post by robmar »

I developed and tested them on Irrlicht 1.7.3, hence interest in test them on the DX11 version.

But it doesn´t compile because the vcproj for vs2010 does not include all the directories, as it should, or because there is some other thing not set up.

D3D_SHADER_MACRO is found when I press F12 on it, but during compile its not found, which might indicate that the includes need to be in a certain order, or something.

D3D_SHADER_MACRO roots to this:-

typedef struct _D3D_SHADER_MACRO
{
LPCSTR Name;
LPCSTR Definition;
} D3D_SHADER_MACRO;

Is there something wrong with the definitions?

void addMacros(core::array<D3D_SHADER_MACRO>& macroArray);

This is my include path:-

$(IncludePath);
$(CG_INC_PATH);
C:\Program Files %28x86%29\Microsoft DirectX SDK %28June 2010%29\Include;
D:\RepIrrwc\include; // Irlicht
$(DXSDK_DIR)Include
Post Reply