DirectX 11 render system - work-in-progress
-
Assaf Raman
- OGRE Team Member

- Posts: 3092
- Joined: Tue Apr 11, 2006 3:58 pm
- Location: TLV, Israel
- x 76
Not done yet with the merge, but getting there.
Here is the code backup:Direct3D10_pre10.zip
I didn't finish the render function because I want to rewrite the fixed func use.
I will use the exact same shader as in the DX 10 sample, and I will write the code that auto generate the input by the vertex declaration.
I merged most of my code with Sinbad code. I hope to be done with the merge tomorrow so we can update the CVS.
I added something nice to the code today, I created a class to wrap the ID3D10Device interface and I implemented the "->" operator, so I could replace all the ID3D10Device data members with the new ID3D10Device wrapper (called D3D10Device). So – now I can clean the ID3D10InfoQueue before every ID3D10Device call, and so – I can have the error string for ID3D10Device errors, this helps a lot with the debugging. I will add tests and exceptions after every ID3D10Device call. In dx10 there are a lot of the ID3D10Device calls that don't return an HResult value (like VSSetShader and such), so this will be the only way to see if there are errors, so now I won't need to "clear the error log" before every ID3D10Device use, the new class does it for me.
Here is the code backup:Direct3D10_pre10.zip
I didn't finish the render function because I want to rewrite the fixed func use.
I will use the exact same shader as in the DX 10 sample, and I will write the code that auto generate the input by the vertex declaration.
I merged most of my code with Sinbad code. I hope to be done with the merge tomorrow so we can update the CVS.
I added something nice to the code today, I created a class to wrap the ID3D10Device interface and I implemented the "->" operator, so I could replace all the ID3D10Device data members with the new ID3D10Device wrapper (called D3D10Device). So – now I can clean the ID3D10InfoQueue before every ID3D10Device call, and so – I can have the error string for ID3D10Device errors, this helps a lot with the debugging. I will add tests and exceptions after every ID3D10Device call. In dx10 there are a lot of the ID3D10Device calls that don't return an HResult value (like VSSetShader and such), so this will be the only way to see if there are errors, so now I won't need to "clear the error log" before every ID3D10Device use, the new class does it for me.
Watch out for my OGRE related tweets here.
-
Assaf Raman
- OGRE Team Member

- Posts: 3092
- Joined: Tue Apr 11, 2006 3:58 pm
- Location: TLV, Israel
- x 76
Done with the merge.
Here is the code backup:Direct3D10_pre11.zip
I can't see anything. This is debug time.
I did the base for the fixedFunc, we will need to do it better after we see something.
Sinbad - I think you can review and check-in to the CVS.
Here is the code backup:Direct3D10_pre11.zip
I can't see anything. This is debug time.
I did the base for the fixedFunc, we will need to do it better after we see something.
Sinbad - I think you can review and check-in to the CVS.
Watch out for my OGRE related tweets here.
-
sinbad
- OGRE Retired Team Member

- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 67
I'm willing just to give you access to CVS so you can do the work there - the history will be available should anything accidentally get lost in the merge anyway.
I just need a contributor license agreement with a record of your Sourceforge account.
I just need a contributor license agreement with a record of your Sourceforge account.
-
Assaf Raman
- OGRE Team Member

- Posts: 3092
- Joined: Tue Apr 11, 2006 3:58 pm
- Location: TLV, Israel
- x 76
Added error checks to most device calls.
Renamed all the D3D10device data members to be called mDevice.
Added error description to the output of all the exceptions so now we can see the error descriptions in the log and also have exceptions for device methods without a return code.
I don't know why some of the device methods don't have an error code – but it seems that my method of discovering errors work quite well.
In the future I will add more options in the render system commands – so we will be able to turn on log based error detection in release by selecting an option, and possibly add a parameter to define the error level for the exceptions.
Here is the code backup:Direct3D10_pre12.zip
Now I will try to work on getting the render system to render something – I will compare the version I have that renders to the merged version.
Renamed all the D3D10device data members to be called mDevice.
Added error description to the output of all the exceptions so now we can see the error descriptions in the log and also have exceptions for device methods without a return code.
I don't know why some of the device methods don't have an error code – but it seems that my method of discovering errors work quite well.
In the future I will add more options in the render system commands – so we will be able to turn on log based error detection in release by selecting an option, and possibly add a parameter to define the error level for the exceptions.
Here is the code backup:Direct3D10_pre12.zip
Now I will try to work on getting the render system to render something – I will compare the version I have that renders to the merged version.
Watch out for my OGRE related tweets here.
-
Assaf Raman
- OGRE Team Member

- Posts: 3092
- Joined: Tue Apr 11, 2006 3:58 pm
- Location: TLV, Israel
- x 76
I got it to render - I will post the code later today.
The problem was that in my fixFunc vertex shader creator I analyzed the vertex declaration and created the shader input struct by the declaration, for position I created a float3 parameter instead of a float4 that seems to be needed. So I fixed it so the position will always be float4.
The problem was that in my fixFunc vertex shader creator I analyzed the vertex declaration and created the shader input struct by the declaration, for position I created a float3 parameter instead of a float4 that seems to be needed. So I fixed it so the position will always be float4.
Watch out for my OGRE related tweets here.
-
Assaf Raman
- OGRE Team Member

- Posts: 3092
- Joined: Tue Apr 11, 2006 3:58 pm
- Location: TLV, Israel
- x 76
OK, I am rendering.
Added a parameter named "Information Queue Exceptions Bottom Level" to the options - to control the level of dx10 information queue messages that will cause an exception.
Also solved some bugs with the memory buffers and the fixedFunc.
I think this is the time to update the CVS with this code.
The following OGRE demos seem to work with this code without change to the demo code: Demo_ParticleFX, Demo_BezierPatch, Demo_FacialAnimation.
I guess other demos work also – I didn't test them all.
Here is the code:Direct3D10_pre13.zip
The license for the code is the same as the OGRE license and I already signed the OGRE contributor forum and sent it to Sinbad (years ago
).
Added a parameter named "Information Queue Exceptions Bottom Level" to the options - to control the level of dx10 information queue messages that will cause an exception.
Also solved some bugs with the memory buffers and the fixedFunc.
I think this is the time to update the CVS with this code.
The following OGRE demos seem to work with this code without change to the demo code: Demo_ParticleFX, Demo_BezierPatch, Demo_FacialAnimation.
I guess other demos work also – I didn't test them all.
Here is the code:Direct3D10_pre13.zip
The license for the code is the same as the OGRE license and I already signed the OGRE contributor forum and sent it to Sinbad (years ago
Watch out for my OGRE related tweets here.
-
Assaf Raman
- OGRE Team Member

- Posts: 3092
- Joined: Tue Apr 11, 2006 3:58 pm
- Location: TLV, Israel
- x 76
The CVS is updated with the latest code.
From now on - I will commit my changes to the CVS and will not post any more source code in this thread.
I will keep you posted with this thread.
From now on - I will commit my changes to the CVS and will not post any more source code in this thread.
I will keep you posted with this thread.
Watch out for my OGRE related tweets here.
-
CaseyB
- OGRE Contributor

- Posts: 1335
- Joined: Sun Nov 20, 2005 2:42 pm
- Location: Columbus, Ohio
- x 3
-
sinbad
- OGRE Retired Team Member

- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 67
-
Assaf Raman
- OGRE Team Member

- Posts: 3092
- Joined: Tue Apr 11, 2006 3:58 pm
- Location: TLV, Israel
- x 76
DX10 doesn't support assembly shaders - so it doesn't support the cg compiler that compiles cg to assembly, so - in order to solve this the solution is to compile cg as hlsl, the languages are almost the same so - it will work in a lot of the cases.
Also – if the cg plugin registers – it starts to compile shaders and to create assembly shaders that we don't want. So – I made a little patch that unregister the cg plugin factory and register the DX10 hlsl factory instead.
That is the best choice I can see for now.
I also fixed the world matrix in the render system to work.
I added lighting enabled parameter to the fixedFunc.
I added a basic texture matrix transform to the fixedFunc.
I worked more on the render to texture and got the related code to a better state.
Now a lot more of the demos work.
Latest code is in the cvs head.
If anyone wants screenshots – post a replay and I will add some to the showcase thread.
Also – if the cg plugin registers – it starts to compile shaders and to create assembly shaders that we don't want. So – I made a little patch that unregister the cg plugin factory and register the DX10 hlsl factory instead.
That is the best choice I can see for now.
I also fixed the world matrix in the render system to work.
I added lighting enabled parameter to the fixedFunc.
I added a basic texture matrix transform to the fixedFunc.
I worked more on the render to texture and got the related code to a better state.
Now a lot more of the demos work.
Latest code is in the cvs head.
If anyone wants screenshots – post a replay and I will add some to the showcase thread.
Watch out for my OGRE related tweets here.
-
Assaf Raman
- OGRE Team Member

- Posts: 3092
- Joined: Tue Apr 11, 2006 3:58 pm
- Location: TLV, Israel
- x 76
Ok, tomorrow I will get the "take screenshot" working for the DX10 render system and post a screenshot of each of the running demos – so you will be able to see the status of the project.
Watch out for my OGRE related tweets here.
-
Assaf Raman
- OGRE Team Member

- Posts: 3092
- Joined: Tue Apr 11, 2006 3:58 pm
- Location: TLV, Israel
- x 76
I kept having problems with TortoiseCVS and vista – TortoisePlink.exe creases when I try to update or commit, the problem only occurs when I access the cvs in secure mode (ext). So – I downloaded the TortoiseCVS code, compiled and debug, and it seems the crash was because of a string formatting code of a failed access attempt to the cvs, so I fixed the problem and now it doesn't crash when I access the cvs and can't get access, it just writes – " cvs commit: warning: unrecognized response `Access denied' from cvs server" a few times.
It seems that from time to time the secure access is too busy or something so my access is denied, after a few attempts or after some time passes I do have access.
If any of you have this problem with the crash here is my fixed TortoisePlink.exe that you can just copy to your TortoiseCVS install directory instead of the existing file. You will still get the "access denied" – but no crash.
I am posting this message here because the only secure cvs commit I am currently doing is to the OGRE DX10 render system, and the "access denied" is bugging me like hell.
It seems that from time to time the secure access is too busy or something so my access is denied, after a few attempts or after some time passes I do have access.
If any of you have this problem with the crash here is my fixed TortoisePlink.exe that you can just copy to your TortoiseCVS install directory instead of the existing file. You will still get the "access denied" – but no crash.
I am posting this message here because the only secure cvs commit I am currently doing is to the OGRE DX10 render system, and the "access denied" is bugging me like hell.
Watch out for my OGRE related tweets here.
-
Assaf Raman
- OGRE Team Member

- Posts: 3092
- Joined: Tue Apr 11, 2006 3:58 pm
- Location: TLV, Israel
- x 76
Now you can take screenshots.
The latest code is in the cvs and the latest screenshots are in the showcase thread of this project.
The latest code is in the cvs and the latest screenshots are in the showcase thread of this project.
Watch out for my OGRE related tweets here.
-
sinbad
- OGRE Retired Team Member

- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 67
Weird, I'm using Tortoise on Vista and I haven't noticed this problem - all I have noticed is that Visual Studio 2005 crashes an awful lot when doing batch builds, which is very annoying. Are you on the 64-bit version or 32-bit?Assaf Raman wrote:I kept having problems with TortoiseCVS and vista – TortoisePlink.exe creases when I try to update or commit,
-
bibiteinfo
- Gremlin
- Posts: 197
- Joined: Wed Apr 12, 2006 2:48 pm
- Location: Montreal, Canada
-
bibiteinfo
- Gremlin
- Posts: 197
- Joined: Wed Apr 12, 2006 2:48 pm
- Location: Montreal, Canada
I can do a CVS checkout and then whenever I do CVS update with Tortoise, I'm getting the TortoisePlink.exe stopped working window. I see the update window, but it never ask me my password. It happen in ext ssh mode, I don't know if this has a link or not.
The bug report is here : http://sourceforge.net/tracker/index.ph ... tid=451972
The bug report is here : http://sourceforge.net/tracker/index.ph ... tid=451972
-
Assaf Raman
- OGRE Team Member

- Posts: 3092
- Joined: Tue Apr 11, 2006 3:58 pm
- Location: TLV, Israel
- x 76
Bad news, we won't be able to use cg as hlsl, more over, we won't be able to use any type of shader with the DX10 system except hlsl shader model 4.
I couldn't get older shader to work (they compile but CreateVertexShader and CreatePixelShader doesn't return a shader object for the ID3D10Blob I got from the compile.)
I rechecked and it seem they dropped the support for older shader models.
Look for the help topic "D3D10CompileShader" in the directx_sdk.chm that comes with the latest dx sdk, and you will find this quote:
I will remove the cg as hlsl support I just added.
I couldn't get older shader to work (they compile but CreateVertexShader and CreatePixelShader doesn't return a shader object for the ID3D10Blob I got from the compile.)
I rechecked and it seem they dropped the support for older shader models.
Look for the help topic "D3D10CompileShader" in the directx_sdk.chm that comes with the latest dx sdk, and you will find this quote:
The Direct3D 10 currently supports only "vs_4_0", "ps_4_0", and "gs_4_0".
I will remove the cg as hlsl support I just added.
Watch out for my OGRE related tweets here.


