0

i want to know what are the functions in the opengl that allows me to draw curves ? cause i learned so far only Points , Lines and polygon . and i'm trying to draw cartoon character in my lab but i have to write that function whose allow me to draw curves .

genpfault
  • 49,394
  • 10
  • 79
  • 128
i_Amwaj
  • 21
  • 1
  • 1
  • 5
  • Legacy GL has evaluators, (e.g. [`glEvalMesh...`](https://www.opengl.org/sdk/docs/man2/xhtml/glEvalMesh.xml)) but they were never really HW accelerated and have been removed from core profiles in GL 3.2+. You can continue to use them in a compatibility profile or anything GL 3.0 or older, new software is expected to implement them using some combination of vertex/geometry shaders and possibly tessellation shaders; which ***are*** HW accelerated. – Andon M. Coleman Mar 07 '14 at 01:36

1 Answers1

3

OpenGL only supports points, lines and triangles.

https://www.opengl.org/wiki/Primitive

To draw curves you'll need to render multiple lines. (e.g. GL_LINE_STRIP)

See: OpenGL Coordinates from Bezier Curves

For drawing a "cartoon character" you might want to consider using textures instead, or a 3-D model.

Community
  • 1
  • 1
FogleBird
  • 70,488
  • 25
  • 121
  • 130