PDA

View Full Version : problem in rotation of sphere with cubes



Ahmed Shaban
03-15-2012, 06:50 PM
I write a code which draw 3 cubes and part of sphere.(In the attachment)

Moving mouse while pressed mouse left button will rotate them.
right button will translate them.
rotate mouse scroll will zooming them.

I have 2 problems
1-there is something wrong in rotation as sphere always appear above all cubes.
2-the part of sphere is good for front face while the back is very bad.

Note : I used OpenTK under C# express 2010

ZbuffeR
03-16-2012, 02:10 AM
(only from picture)
do you request a depth buffer at GL window creation, do you enable depth test, do you enable backface culling ?

Ahmed Shaban
03-17-2012, 11:02 AM
yes, I enabled depth test with DepthFunction.Less and CullFaceMode.FrontAndBack

nothing solve the problem

ZbuffeR
03-18-2012, 01:48 AM
Fine but what about "request a depth buffer at GL window creation" ?

Ahmed Shaban
03-19-2012, 02:26 AM
can you help me how to request.

Ahmed Shaban
03-20-2012, 02:44 PM
can any one help me to solve this problem shown in the photo?

Ahmed Shaban
04-02-2012, 09:25 AM
can I get help to solve this issue.