Can't add Material to Sphere object

May 23, 2012 at 7:43 AM
Edited May 23, 2012 at 7:48 AM

I've try this code

SharpGL.SceneGraph.Quadrics.Sphere sphere = new SharpGL.SceneGraph.Quadrics.Sphere();
            sphere.Transformation.TranslateZ = 4f;
            sphere.Transformation.ScaleX = 1.5f;
            sphere.Transformation.ScaleY = 1.5f;
            sphere.Transformation.ScaleZ = 1.5f;
            sphere.AddEffect(arcBallEffect);
            SharpGL.SceneGraph.Assets.Material material = new Material();
            material.Ambient = Color.FromArgb(255,Color.Red);
            sphere.Material = material;
but when i try to add this line of code i've got an error
Code : sphere.Material = material; 
Error : 'SharpGl.SceneGraph.Quarics.Sphere' does not contain a definition for 'Material' and no extension method 'Material' accepting a first argument of type
Can anyone help me ?
Thanks before
Coordinator
May 23, 2012 at 2:26 PM

Have you tried getting the very latest version of the source code? There are some improvements there with materials, some of the stuff you might see in the discussions in terms of materials relates to the newer code :)

May 23, 2012 at 4:11 PM

which one sample ?

May 30, 2012 at 4:20 AM

Hallo, anyone know the answer?
How to add texture or material to Sphere object?

Coordinator
Jun 5, 2012 at 7:14 AM

As soon as I get a chance I'll write a little example for this and send it to you and add it to the samples :)

Jun 5, 2012 at 2:44 PM
Oooh no, i'm in hurry too :'(

Sent from Windows Phone

From: dwmkerr
Sent: 6/5/2012 2:14 PM
To: ilham.andrian@live.com
Subject: Re: Can't add Material to Sphere object [sharpgl:356808]

From: dwmkerr

As soon as I get a chance I'll write a little example for this and send it to you and add it to the samples :)