3

NURBS chapter in RedBook is denoted deprecated, including utility library: "Even though some of this functionality is part of the GLU library, it relies on functionality that has been removed from the core OpenGL library."

Does it mean OpenGL 4.2 actually lacks C++ toolkit for manipulating NURBS curves and surfaces? There are some commercial 3rd party toolkits, but they're not crossplatform ( windows, mainly )

...?

Ahk4iePaiv8u
  • 108
  • 1
  • 8
  • Pls add info, for what you need NURBS. – przemo_li Aug 11 '12 at 14:44
  • I'm trying to achieve effect similar to banner waving of a surface, but I'd like to get nice disordered movement, other than simple wave-over. Manipulating knots positions seems a lot better way than influencing individual vertexes of primitives – Ahk4iePaiv8u Aug 12 '12 at 08:15

2 Answers2

5

In OpenGL-3 and later you've got geometry, and vertex shaders at your disposal, OpenGL-4 even provides tesselation shaders. They offer everything to implement GPU accelerated NURBS and Bezier splines and surfaces. The evaluators of OpenGL-1.1 never were GPU accelerated on most hardware. So actually you're better off without them.

Just implement NURBS or Bezier evaluators in the shaders and send in vertices as surface sampling points.

datenwolf
  • 159,371
  • 13
  • 185
  • 298
2

With respect to your question regarding the Red Book, the GLU library wasn't officially deprecated by the OpenGL ARB, rather just ignored. However, GLU used features that were deprecated in OpenGL 3.0, and removed in OpenGL 3.1: immediate-mode rendering, display lists, matrix stacks, to name a few. Specific to NURBS, they used several of those features (assuming the GLU library associated with your OpenGL implementation was based on the SGI version of GLU, which most were), and so features just won't work in a core context. It's not the lack of the C++-based GLU library, as much as GLU used features removed from modern OpenGL.

@datenwolf - not quite. The GLU NURBS library supported trimming curves, which are challenging to implement in all cases using the OpenGL vertex shader pipeline (i.e., vertex, tessellation, and geometry shading only). Specifically, support for winding rules and correct trimming while respecting trim-curve crossings is pretty darned tough (it may be possible with a combination of compute shaders and fancy work in a fragment shader). You could hack trimming using an alpha texture, but you'd suffer aliasing results, but it's a quick fix.

radical7
  • 8,957
  • 3
  • 24
  • 33