Jump to content

View more

Image of the Day

Boxes as reward for our ranking mode. ヾ(☆▽☆)
#indiedev #gamedev #gameart #screenshotsaturday https://t.co/ALF1InmM7K
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Sponza rendering issue

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
7 replies to this topic

#1 newtechnology   Members   

1759
Like
0Likes
Like

Posted 05 May 2014 - 12:09 AM

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?


Edited by newtechnology, 05 May 2014 - 12:11 AM.


#2 bioglaze   Members   

1583
Like
0Likes
Like

Posted 05 May 2014 - 12:23 AM

What error?



#3 newtechnology   Members   

1759
Like
0Likes
Like

Posted 05 May 2014 - 12:25 AM

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.


Edited by newtechnology, 05 May 2014 - 12:50 AM.


#4 BitMaster   Members   

8647
Like
0Likes
Like

Posted 05 May 2014 - 12:47 AM

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

#5 newtechnology   Members   

1759
Like
0Likes
Like

Posted 05 May 2014 - 12:54 AM

runtime error. 

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


Edited by newtechnology, 05 May 2014 - 01:11 AM.


#6 DaBono   Members   

1472
Like
2Likes
Like

Posted 05 May 2014 - 01:24 AM

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.



#7 newtechnology   Members   

1759
Like
0Likes
Like

Posted 05 May 2014 - 01:38 AM

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



#8 newtechnology   Members   

1759
Like
0Likes
Like

Posted 07 May 2014 - 12:22 AM

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


Edited by newtechnology, 07 May 2014 - 02:15 AM.





Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.