• Advertisement
Sign in to follow this  

Drawing Sphere using Direct3D11 in C# (SlimDx)

This topic is 2262 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

Is there anyone who can tell me how can I draw a simple sphere with these three options.


"Radious"
"Center"
"Color"

Public void Draw_Sphere(Vector3 center,Color4 color,float radious){
..
..
.
}

I am using SlimDx in C#. and it is required to draw in direct3d11 not in direct3d9 using mesh.createsphere... I will appreciate any help ...

Share this post


Link to post
Share on other sites
Advertisement
if you want a voxel sphere, just make a texture and fill in any pixel that obeys sqrt(x*x+y*y+z*z)<radius... thats the easiest sphere. :)

Share this post


Link to post
Share on other sites
Its easy to come up with concept too, I have worked in XNA. I recently switched to SlimDx and there are a lot of concepts regarding pipeline & stuff like that and the problem i am facing is implementation actually.
Thanks for reply , I will think about it if I can make my self able to implement what you just said :P




if you want a voxel sphere, just make a texture and fill in any pixel that obeys sqrt(x*x+y*y+z*z)<radius... thats the easiest sphere. :)

Share this post


Link to post
Share on other sites
Why not roll your own mesh.createsphere work-alike? Is this just to get the job done, or are there other constraints on your approach?

The math is pretty simple to create points on the surface of a sphere and then create a triangle list/strip from that.

Share this post


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

  • Advertisement