View Full Version : Drawing Sphere in Cocoa OpenGL
hoschi
Oct 20, 2005, 08:56 PM
Wonder how to draw a sphere which I can center anywhere in the window and not just centered at the origin..
Thanks in advance
Artful Dodger
Oct 20, 2005, 10:34 PM
One like this? sorry didn't see the cocoa part, my bad :o
hoschi
Oct 21, 2005, 11:03 AM
One like this? sorry didn't see the cocoa part, my bad :o
right.. something like that...
HiRez
Oct 21, 2005, 12:26 PM
Wonder how to draw a sphere which I can center anywhere in the window and not just centered at the origin.You can apply a translation transformation to move the sphere away from the origin, or change the view matrix (IOW, move the camera off-center so it's not looking directly at a sphere at the origin). Not sure if you're asking something different because you did mention "Cocoa OpenGL" specifically, but for most things it's the same as any OpenGL.
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.