Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

hoschi

macrumors newbie
Original poster
Sep 20, 2005
29
0
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

macrumors 68020
One like this? sorry didn't see the cocoa part, my bad :eek:
 

Attachments

  • 573.jpg
    573.jpg
    14.5 KB · Views: 1,923
  • 575.jpg
    575.jpg
    14.8 KB · Views: 1,929

HiRez

macrumors 603
Jan 6, 2004
6,265
2,629
Western US
hoschi said:
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.