- For individual users
- Instant access to solutions
- Ask your tech questions
- Start your 30-day Free Trial
Main Topics
Browse All TopicsOk, I am just trying to get started with Managed DirectX and I have a simple question.
I am wondering how I can draw a Sphere without having to use a .x file. I see that the there is a Mesh.Sphere method but I am not sure if that is what I need or how to use it.
I just want to be able to tell the program where and how big the sphere should be and put a texture on it.
Any help would be nice.
Thanks,
Mike
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: ChordlessPosted on 2004-05-25 at 07:32:19ID: 11152297
Hey, that's no problem.
All you have to do is to create a mesh variable (no need to initialize it, just "Mesh MyMesh;" will do).
Then you set the mesh object you created to the Mesh.Sphere type (yes, it's a static method).
I'll write it in code for clarity:
//add the references you need
using Microsoft.DirectX.Direct3D
class MyClass()
{
Mesh MyMesh;
void MakeSpereMesh()
{
MyMesh = Mesh.Sphere(parameters here);
}
}
There, now you can render the mesh as any other mesh (hint: MyMesh.DrawSubset(0) ).
You might find it easier to use the Mesh.Teapot object instead of the sphere, as it has less parameters.
Hope this is of help to you