Closed istvankovacs-priv closed 5 years ago
The solution is to miss the custom calculations and utilize the regular sphere fuction of the opengl and use clipping the get desired half (or smaller piece, because you can apply multiple clips) of the sphere. Actually the correct name of this quadric is hemisphere not halfsphere as I called it before.
Hey Guys,
This isn't an issue, this is more like a question. I use your library in my project where I need to make a half sphere. I managed to find a method to successfully create the geometry but I have problems with the appearance of it. If I put it next to an original quadric, like a sphere or a cylinder, you can clearly see the difference. So I would like to ask you where should I start to look for the solution? What could cause the color difference between the shapes when they have the same material? At the beginning I thought it is caused by material, but I experimented with a lot lately and now I think it is related to the shaders, which unfortunatelly an unfamiliar place for me. Thank your for your reply!
EDIT: it's about the normal generation, but still don't know where to start
Regards, Steve
P.S.: thank you for your amazing library, it's really easy and handy to use
Here you can see the half sphere on top and bottom, and there is an original cylinder between them.
This is how I make the geometry. I added a new func to SharpGL's OpenGL class. Other things are the same as the original sphere, but I call this in my half sphere's render function.
`public void HalfSphere(IntPtr qobj, double radius, int slices, int stacks, bool istop) { PreGLCall();