farm ostrich
farm ostrich

Reputation: 5989

OpenGL -- What is the most efficient way to draw an oval in OpenGL?

I have been using TRIANGLE_FAN and drawing like 90 triangles. What's a better way?

Upvotes: 2

Views: 2025

Answers (2)

Jim Buck
Jim Buck

Reputation: 20724

That's pretty much it, you can adjust that 90 up or down to your liking (or make it dependent on how big it is on-screen, or you could go the route of a geometry shader.

If you are ok with it not being geometry-based, just create a texture that is in the shape of an oval, and apply it to a quad.

Upvotes: 1

Heisenbug
Heisenbug

Reputation: 39194

Look at this page drawing. It explain 2 different methods.

EDIT:

I was forgetting about nurbs. You could also use them . Have a look here

Upvotes: 1

Related Questions