what Mesh Viewer does ?
For the same mesh object, Mesh Viewer always have better image quality than my program. I don't know what it does. My program use default shader of D3D. I want to know what Mesh Viewer use or whatever it dose.:(
BTW: the source code to the DirectX Viewer (or Mesh Viewer in older SDKs IIRC) is in the SDK, so you can take a look at and copy exactly what it does.
Take a look in the %dxsdk_dir%\Utilities\Source\DxViewer folder.
Take a look in the %dxsdk_dir%\Utilities\Source\DxViewer folder.
I think the key is DrawSubset() method. but...
Is there a way to know the internal workings of
DrawSubset (for meshes)?
Is there source code available of this
method?
I would like to know what settings to the render
pipeline it does. For example, if I set a vertex shader,
does DrawSubset render with this shader or does it
use it's own.
Is there a way to know the internal workings of
DrawSubset (for meshes)?
Is there source code available of this
method?
I would like to know what settings to the render
pipeline it does. For example, if I set a vertex shader,
does DrawSubset render with this shader or does it
use it's own.
You can use PIX to capture a call stream. This would more or less show you which lower-level D3D calls DrawSubset makes internally.
In general, DrawSubset doesn't modify any render states. If you have a shader bound when calling it, the subset will be drawn with that shader and using the states that were then set.
If you wanted to replace what DrawSubset is doing, I'd estimate it the equivalent to:
1) SetStreamSource,
2) SetIndices,
3) SetFVF,
4) DrawIndexedPrimitives.
I don't think it makes any other D3D calls, and if it does, none with any major effect.
Hope this helps :).
In general, DrawSubset doesn't modify any render states. If you have a shader bound when calling it, the subset will be drawn with that shader and using the states that were then set.
If you wanted to replace what DrawSubset is doing, I'd estimate it the equivalent to:
1) SetStreamSource,
2) SetIndices,
3) SetFVF,
4) DrawIndexedPrimitives.
I don't think it makes any other D3D calls, and if it does, none with any major effect.
Hope this helps :).
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement