Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Is there any replacement for CDXUTSDKMESH in DX11?


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
2 replies to this topic

#1 steven166   Members   -  Reputation: 234

Like
0Likes
Like

Posted 11 October 2012 - 07:45 PM

In DX11, I think we can use 2 classes to load a mesh CDXUTSDKMESH, which uses ID3D11Device, for obj and sdkmesh extension, and CDXUTFILEMESH, which uses ID3D9Device, for x extension. And I want to use Shader model 5, so I need to use CDXUTSDKMESH, but this class has lacked of information like description, example, even on the internet. Therefore, I want to use CDXUTFILEMESH for loading a mesh file, with x extension, modify it if needed, then create a vertex buffer and index buffer for CDXUTSDKMESH. The problem is coming from that way, since in BasicHLSL11 tutorial, they render a mesh using DrawIndexed function like

pd3dImmediateContext->DrawIndexed( ( UINT )pSubset->IndexCount, 0, ( UINT )pSubset->VertexStart );

But there is no way to get IndexCount information from CDXUTFILEMESH. It frustrates me. Moreover, CDXUTSKDMESH is only used for tutorial, and some mesh files with other formats needed to convert to sdkmesh extension before using, but MeshConvert sometimes cannot convert from x extension to sdkmesh extension, because it just outputs an error: "Cannot load specific input file". That is why I want to know that is there anyway to load a mesh with x extension and use like the way we used in DX9 but using DX11 and SM5?

Anybody helps me, please? Thank in advanced.

Sponsor:

#2 kubera   Members   -  Reputation: 946

Like
0Likes
Like

Posted 12 October 2012 - 12:55 AM

You would lock meshe's data in DX9 and export it to your custom format.
Sometimes vertices and indices would be enough.

#3 mhagain   Crossbones+   -  Reputation: 8141

Like
1Likes
Like

Posted 12 October 2012 - 03:51 AM

If you have access to the mesh's index buffer you can call GetDesc on it - that will give you it's size in bytes, from which (assuming that you also know the index format) you can derive the number of indexes.

It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.





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.



PARTNERS