Sign in to follow this  
vcGamer

d3d sphere

Recommended Posts

vcGamer    100
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
DrYap    103
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this