DirectX 11 render system - work-in-progress

Discussion area about developing or extending OGRE, adding plugins for it or building applications on it. No newbie questions please, use the Help forum for that.
Post Reply
User avatar
ja0335
Gremlin
Posts: 154
Joined: Sun Jun 07, 2009 9:04 pm
Location: Bogotá, Colombia
x 4
Contact:

Re: DirectX 11 render system - work-in-progress

Post by ja0335 »

Hi..

Any one may point me how can i build from source the x64 version? what settings need i set up ?

I only added the x64 opcion in the build section but i have this errors:

Error 98 error C1128: number of sections exceeded object file format limit : compile with /bigobj c:\dev-libs\ogre3d-directx11\ogremain\include\ogrememorystlallocator.h 176
Error 551 error LNK1112: module machine type 'x64' conflicts with target machine type 'X86' C:\dev-libs\ogre3d-directx11-sdk\Components\Paging\OgrePaging.dir\Debug\OgreGrid2DPageStrategy.obj 1

I have never compiled in x64 :oops:

Another question:

I am integrating Ogre inside Soft Image the way it is done is equal to the Qt embeding. It works with D3D9 and GL but in D3D11 i'm getting this error:

Unable to set D3D11 vertex declaration in D3D11VertexDeclaration::getILayoutByShader at ..\..\..\..\..\RenderSystems\Direct3D11\src\OgreD3D11VertexDeclaration.cpp (line 159)

I'm sure my vertex and pixel shaders are ok and ready for hlsl 5....
Juan Camilo Acosta Arango
User avatar
robert_sasu
Google Summer of Code Student
Google Summer of Code Student
Posts: 237
Joined: Mon Apr 02, 2012 11:07 am
x 42

Re: DirectX 11 render system - work-in-progress

Post by robert_sasu »

Do you use CMake and Visual Studio ?
If yes, then you have to compile all the dependencies to X64, and remake the Visual Studio solution with CMake. There you will select the appropriate compiler (in this case Visual Studio 2010/2012 x64). Look at Transporter's thread: http://www.ogre3d.org/forums/viewtopic.php?f=4&t=69274 and download from here the appropriate dependencies for Ogre3D X64bit build.
After creating the new solution with CMake, you just simply build from Visual Studio. Be careful and verify to meet all the dependencies at the CMake stage - look at CMake output - boost is a must in this case.

As far as the other error is concerned, I have to investigate a little bit more. Hopefully I will have time to do this in the next 2 days.
Google Summer of Code 2013 Student
Topic: "DirectX 11 & Tessellation samples"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman
User avatar
ja0335
Gremlin
Posts: 154
Joined: Sun Jun 07, 2009 9:04 pm
Location: Bogotá, Colombia
x 4
Contact:

Re: DirectX 11 render system - work-in-progress

Post by ja0335 »

Hey Robert do you still developing under the same repository?
Juan Camilo Acosta Arango
User avatar
robert_sasu
Google Summer of Code Student
Google Summer of Code Student
Posts: 237
Joined: Mon Apr 02, 2012 11:07 am
x 42

Re: DirectX 11 render system - work-in-progress

Post by robert_sasu »

I was not developing in the last month. Next week I will synchronize my repository with the main one.
I have had a lot of school projects to finalize and now I am having my finals.

If you have anything to push, you can do it to that repo :).
Google Summer of Code 2013 Student
Topic: "DirectX 11 & Tessellation samples"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman
User avatar
ja0335
Gremlin
Posts: 154
Joined: Sun Jun 07, 2009 9:04 pm
Location: Bogotá, Colombia
x 4
Contact:

Re: DirectX 11 render system - work-in-progress

Post by ja0335 »

A lot of problems compiling x64...

the dependencies from de link http://www.ogre3d.org/forums/viewtopic.php?f=4&t=69274 in the item Dependencies-vc110-x64-28.05.2013.7z, are supposed pre-compiled to x64? or i must compile for x64? if yes how?
Juan Camilo Acosta Arango
User avatar
robert_sasu
Google Summer of Code Student
Google Summer of Code Student
Posts: 237
Joined: Mon Apr 02, 2012 11:07 am
x 42

Re: DirectX 11 render system - work-in-progress

Post by robert_sasu »

Those are precompiled, you have to put them to the Dependencies folder in the Ogre3D folder, same steps as building for x86 but with other files.
You have to download also boost and compile to x64 and make CMake to see that you have boost installed and running. If you do not want to compile boost manually, download it also from the above mentioned thread.
Google Summer of Code 2013 Student
Topic: "DirectX 11 & Tessellation samples"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman
User avatar
ja0335
Gremlin
Posts: 154
Joined: Sun Jun 07, 2009 9:04 pm
Location: Bogotá, Colombia
x 4
Contact:

Re: DirectX 11 render system - work-in-progress

Post by ja0335 »

I have found the origin of the problem but not the solution to the problem i commented above

Code: Select all

OGRE EXCEPTION(3:RenderingAPIException): Unable to set D3D11 vertex declaration in D3D11VertexDeclaration::getILayoutByShader at ..\..\..\ogre3d-directx11-x64\RenderSystems\Direct3D11\src\OgreD3D11VertexDeclaration.cpp (line 159)
It is generated when i assign a managed material to a manual object of the type Ogre::RenderOperation::OT_LINE_LIST

Code: Select all

Ogre::ManualObject* xLines =  mSceneManager->createManualObject("xLines");
xLines->begin("BFX_CentralGridLine_Mat_Inst", Ogre::RenderOperation::OT_LINE_LIST); 
The material "BFX_CentralGridLine_Mat_Inst" works when assigned to a solid model.

Any idea pointing me to the possible code to look at to solve this issue?
Juan Camilo Acosta Arango
User avatar
robert_sasu
Google Summer of Code Student
Google Summer of Code Student
Posts: 237
Joined: Mon Apr 02, 2012 11:07 am
x 42

Re: DirectX 11 render system - work-in-progress

Post by robert_sasu »

I have tried to recreate your problem, but couldn't. I've got no errors when trying something like this. Try to debug what is happening in D3D11VertexDeclaration::getD3DVertexDeclaration(D3D11HLSLProgram* boundVertexProgram, VertexBufferBinding* binding), it is trying to match each element from the vertex program to mapping and names from input. If at some point there is no matching for a certain index (idx) then it is counting the number of elements for it and associate your element with the one which has index of idx if that those not refer to the end of the list.

Try to debug your vertex program and see if that resolves your problem. Trace everything what is happening in the above mentioned function and give me your results :).
Google Summer of Code 2013 Student
Topic: "DirectX 11 & Tessellation samples"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman
User avatar
ja0335
Gremlin
Posts: 154
Joined: Sun Jun 07, 2009 9:04 pm
Location: Bogotá, Colombia
x 4
Contact:

Re: DirectX 11 render system - work-in-progress

Post by ja0335 »

How can i stream the output in the tessellation stage to the next pass?

Do i need set some parameter in the material script?
Juan Camilo Acosta Arango
User avatar
robert_sasu
Google Summer of Code Student
Google Summer of Code Student
Posts: 237
Joined: Mon Apr 02, 2012 11:07 am
x 42

Re: DirectX 11 render system - work-in-progress

Post by robert_sasu »

DirectX11 continues to evolve. Here are the new features of DirectX 11.2 which is only available for Windows 8.1 and Xbox One: http://msdn.microsoft.com/en-us/library ... 82880.aspx.
Google Summer of Code 2013 Student
Topic: "DirectX 11 & Tessellation samples"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman
Post Reply