farm ostrich
farm ostrich

Reputation: 5979

OpenGL -- for a circle (stored in a VBO), when it is translated, where does the center lie?

Let's say I buffered a unit circle (from a triangle fan) that has a radius of one, and then I translate the object gltranslate(2,2,0). Where does that place the center of the circle? I come from a java graphics background where (x,y) represents the top left corner of an object.

Upvotes: 1

Views: 322

Answers (1)

Drew Hall
Drew Hall

Reputation: 29055

Assuming that the modelview matrix was the identity prior to your glTranslate() call, and further assuming that your VBO circle was defined with respect to the origin, the circle's center will be at (2,2,0).

Upvotes: 2

Related Questions