Check the DXUT Library under
I'm not entirely sure, but from looking over the documentation it appears that the D3DX utility library has been significantly trimmed between DX9 and DX10. See the following links for a side by side comparison of both libraries:
It seems to me that the shape drawing functions have not been relocated to another portion of the library, but removed entirely instead. You still have mesh support though, using the
ID3DX10Mesh interface and the
With further investigation I managed to find the methods you wanted in the DXUT Library. This is the library used in most of the official DX samples that come with the SDK. I think you should be able to find the library under
DXSDK_DIR\Samples\C++\DXUT. In particular check the
DXUTShapes.h file which has the following method:
HRESULT WINAPI DXUTCreateSphere(ID3D10Device* pDevice,
ID3DX10Mesh** ppMesh );
In case you don't want to use that library because it implies having to include and link to yet another library, here's some other alternatives I could think of:
The easiest method and also the one I'd probably use would be to generate a sphere in a 3D modelling application such as Blender and import it. Make the sphere have a diameter of 1 unit and be centered around the origin, so that with a simple scaling and translation of the vertices you can adjust it to any size and location.
Alternatively you could also think about generating the vertex information for the sphere procedurally with your own code (this answer has a lot of information on how to do this) and populating a mesh object with that data.
Finally I can think of yet another solution but I'm not sure I would recommend it as it seems very much like a hack. That alternative would be to initialize a minimal Direct3D 9 device object just so so you can run the
D3DXCreateSphere method once, store the data in memory, and then use it later to initialize the Direct3D 10 objects.