skia2/third_party/glu
senorblanco@chromium.org 5ed23dee37 [Committed on behalf of scottmg@chromium.org]
Rename all __gl_ functions to Sk__gl_ to avoid conflicting with other copies
of libtess that might be statically linked by Skia clients (done via
gluos.h, rather than touching source directly).

Specfically, this is required to enable incremental linking on Windows builds
of Chromium because WebKit has a copy of libtess also.

http://code.google.com/p/chromium/issues/detail?id=92172
http://code.google.com/p/skia/issues/detail?id=338

Review URL:  http://codereview.appspot.com/4853046/



git-svn-id: http://skia.googlecode.com/svn/trunk@2095 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-08-10 17:49:41 +00:00
..
libtess [Committed on behalf of scottmg@chromium.org] 2011-08-10 17:49:41 +00:00
gluos.h [Committed on behalf of scottmg@chromium.org] 2011-08-10 17:49:41 +00:00
LICENSE.txt Add the GLU tesselator source files to third_party. Add a libtess static 2011-03-25 17:41:34 +00:00
README.skia [Committed on behalf of scottmg@chromium.org] 2011-08-10 17:49:41 +00:00
sk_glu.h Rename glu libtess symbols. When enabled in WebKit, the internal_glu libtess 2011-05-25 14:46:17 +00:00

This is a nearly verbatim copy of the GLU tessellator source code from
SGI's OpenGL Sample Implementation at
http://oss.sgi.com/projects/ogl-sample/ . Per
http://oss.sgi.com/projects/FreeB/ , the code is covered under the SGI
Free Software License B, version 2.0, a copy of which is in
LICENSE.txt in this directory.

The following changes were made in order to incorporate this code:

  - The addition of a simplified gluos.h to eliminate operating system
    dependencies.  The entry points to the tessellator were prefixed with
    Sk_ to avoid symbol collisions with any host OS version of GLU via
    #defines in gluos.h.

  - The removal of inclusion of GL/glu.h and replacement with an
    include of sk_glu.h.

  - In tess.c, the obsolete entry points gluBeginPolygon,
    gluNextContour and gluEndPolygon in tess.c were #if 0'd out.
    Default branches were added to the switch statements in GotoState.

  - In memalloc.h, the include of malloc.h was changed to an include
    of stdlib.h.

  - In normal.c, an unused variable "w" was removed from
    __gl_projectPolygon. #if guards were placed around the definition
    of the unused Normalize function.

  - In priorityq-heap.c, an #include of <limits.h> was added.

  - In sweep.c, IsWindingInside() was given a return value to silence a
    warning-as-error in release builds.

  - In sweep.c, DoneEdgeDict()'s fixedEdges was wrapped in #indef NDEBUG, to
    silence a warning-as-error in release builds.

  - In priorityq.c, render.c, and others:  the construct "if(1)...else" was
  replaced with "do{...}while(1)" to silence a warning-as-error in Mac builds.

  - rename all __gl_ functions to Sk__gl_ to avoid conflicting with other
    static linkers of this library.