Sponza rendering issue

Started by
6 comments, last by 215648 9 years, 11 months ago

When I try to load sponza model, I end up here getting an error:


template<typename IBaseInterface>
HRESULT TDepthStencilViewVariable<IBaseInterface>::SetDepthStencil(ID3D11DepthStencilView *pResource)
{
    HRESULT hr = S_OK;
 
#ifdef _DEBUG
    LPCSTR pFuncName = "ID3D11DepthStencilViewVariable::SetDepthStencil";
 
#endif
 
    // Texture variables don't need to be dirtied.
    SAFE_ADDREF(pResource); -> HERE
    SAFE_RELEASE(Data.pDepthStencilView->pDepthStencilView);
    Data.pDepthStencilView->pDepthStencilView = pResource;
 
lExit:
    return hr;
}

But it doesn't happen with other models? what is going wrong here?

Advertisement

What error?

Aether3D Game Engine: https://github.com/bioglaze/aether3d

Blog: http://twiren.kapsi.fi/blog.html

Control

What error?

it just takes me there.

EDIT: If I do this while loading mesh (i.e subtract 15)


for (UINT i = 0; i < pScene->mNumMeshes - 15; ++i)
{//..........................

then it works.

What does that mean? Is it a compile error? A runtime error? What information is given?

runtime error.

Also, I don't know what does that mean, so I asked it here.

You have given us little information to go on. Debugging is a bit like police work: you need to get a lot of clues and from that distill what happened.

As far as I see the runtime error occurs in the DX11 Effects-framework. Since you say 'it just goes there', I'm suspecting your debugger stopped execution there because of a crash, or an exception. Could it be pResource is just NULL? You can check in the debugger (or by checking in the code).

You already deduced that the error only occurs in the last 15 meshes. How many meshes are there (i.e. is at least one mesh actually succesfully loaded?). Can you pinpoint which exact meshes fail to load? Oh also, there's lots of versions of the Sponza model. It may help to know which one you're using.

Please try to dig a little deeper. That way, either you figure it out yourself, or are able to provide us with some information to help you better.

Good luck.

confirmed problem is with setting texture SRV. When I used a uniform texture for whole mesh, it worked.

I fixed it by passing null SRV in my std::vector and then checking if the SRV was not null in the vector then only render.

1904141_881040891922266_6097043545267747

This topic is closed to new replies.

Advertisement