• Advertisement
Sign in to follow this  

d3d sphere

This topic is 2995 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi I've collected several points to form a sphere but I don't know how to joint them in order to make my sphere solid, should I use triangle list or triangle strip? should I use drawprimitive or drawindexedprimitive? I use C# (VS 2008) & managed DX, is there any sample or tips on how to make my sphere using d3d coding? I can use a pre-modeled X file but it doesn't provide full functionality for my usage (as an earth globe), as I should work precisely on UV mapping, in other hands Mesh class cannot be used (the CreateSphere function) because I cannot easily obtain the VB and also it creates a sphere without UV mapping, so my best solution is to create the sphere using code (like the cylinder created using code in DX tutorials). please guide me on the sphere creation process, primitive type and also the function (indexed or non-indexed). any sample in C#? thanks

Share this post


Link to post
Share on other sites
Advertisement
Hi,

I would use a triangle list with an index buffer and drawindexprimitive as that will make your life alot easier.

You could create a mesh with CreateSphere, clone the mesh to change the FVF so it includes texture coordinates, lock the VB, set the texture coordinates and then unlock the VB.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement