SOLVED Ogre 1.10.8 New Instancing sample crashes with D3D11

Problems building or running the engine, queries about how to use features etc.
Post Reply
Radagast
Kobold
Posts: 33
Joined: Sun Nov 24, 2013 4:23 pm

SOLVED Ogre 1.10.8 New Instancing sample crashes with D3D11

Post by Radagast »

Hi!

I've just build Ogre 1.10.8 without any tweaking and tried to run New Instancing sample from SampleBrowser but it crashes with message Unable to set D3D11 vertex declaration in D3D11VertexDeclaration::getILayoutByShader. The only solution I found in forum is in this topic: http://www.ogre3d.org/forums/viewtopic.php?f=2&t=73955 but I do not know how to use it.

So far I digged a bit into Ogre source and found cause of the problem, it is that in D3D11VertexDeclaration::getD3DVertexDeclaration function in this cycle

Code: Select all

for (i = mElementList.begin(); i != iend; ++i)
{
    LPCSTR semanticName         = D3D11Mappings::get(i->getSemantic());
    UINT semanticIndex          = i->getIndex();
    if(
        strcmp(semanticName, inputDesc.SemanticName) == 0
        && semanticIndex == inputDesc.SemanticIndex
        )
    {
        found = true;
        break;
    }
}
something with semantic name "TANGENT" is never found. All names that are in mElementList are "POSITION", "NORMAL", "BLEND_INDICES", "BLEND_WEIGHTS" and "TEXTURE_COORDINATES".

Is there any workaround?

Thanks,
Radagast
Last edited by Radagast on Tue Sep 19, 2017 7:58 pm, edited 1 time in total.
User avatar
tod
Troll
Posts: 1394
Joined: Wed Aug 02, 2006 9:41 am
Location: Bucharest
x 94
Contact:

Re: Ogre 1.10.8 New Instancing sample crashes with D3D11

Post by tod »

It seems that the sample is broken. I would guess that some model doesn't have tangents on it. It seems like a lot of trouble for you to just fix the sample... unless you really want to use that sample for something.
Radagast
Kobold
Posts: 33
Joined: Sun Nov 24, 2013 4:23 pm

Re: Ogre 1.10.8 New Instancing sample crashes with D3D11

Post by Radagast »

Tod,

Thanks for reply,

I'm trying to run this sample because I need instancing in my application. Looks like with OpenGL it works just fine, so I can use it that way. If that problem is really just a problem of sample and not of D3D11 rendering in general then I think it's OK.
Post Reply