title: Is there a way to force GLUtessellator to use GL_TRIANGLES only?
body: <p>I'm trying to use GLUtesselator to produce 3D extruded text in OpenGL. Here is the relevant code:</p>
  
  <pre><code>private boolean createText(final String displayText)
  {
      final Font font = new Font("Times New Roman", Font.TRUETYPE_FONT, 3);
      final float depth = 1000f;
      final float flatness = 0.0001f;
  
      final GlyphVector glyphVector = font.createGlyphVector(
              new FontRenderContext(new AffineTransform(), true, true), new StringCharacterIterator(displayText));
      final GeneralPath generalPath = (GeneralPath) glyphVector.getOutline();
      final PathIterator pathIterator = generalPath.getPathIterator(AffineTransform.getScaleInstance(1.0, -1.0),
              flatness);
  
      tesselateFace(pathIterator, false, 0.0f);
      return false;
  }
  
  private void tesselateFace(final PathIterator pathIterator, final boolean justBoundary, final double tessZ)
  {
      final GLUtessellatorCallback callback = new TessellatorCallback();
      final GLUtessellator tessellator = glu.gluNewTess();
  
      glu.gluTessCallback(tessellator, GLU.GLU_TESS_BEGIN, callback);
      glu.gluTessCallback(tessellator, GLU.GLU_TESS_END, callback);
      glu.gluTessCallback(tessellator, GLU.GLU_TESS_ERROR, callback);
      glu.gluTessCallback(tessellator, GLU.GLU_TESS_VERTEX, callback);
      glu.gluTessCallback(tessellator, GLU.GLU_TESS_COMBINE, callback);
  
      if (pathIterator.getWindingRule() == PathIterator.WIND_EVEN_ODD)
          glu.gluTessProperty(tessellator, GLU.GLU_TESS_WINDING_RULE, GLU.GLU_TESS_WINDING_ODD);
      else
          glu.gluTessProperty(tessellator, GLU.GLU_TESS_WINDING_RULE, GLU.GLU_TESS_WINDING_NONZERO);
  
      if (justBoundary)
          glu.gluTessProperty(tessellator, GLU.GLU_TESS_BOUNDARY_ONLY, GL.GL_TRUE);
      else
          glu.gluTessProperty(tessellator, GLU.GLU_TESS_BOUNDARY_ONLY, GL.GL_FALSE);
  
      glu.gluTessProperty(tessellator, GLU.GLU_TESS_EDGE_FLAG, GL.GL_TRUE);
  
      glu.gluTessBeginPolygon(tessellator, (double[]) null);
  
      while (!pathIterator.isDone())
      {
          final double[] coords = new double[3];
          coords[2] = tessZ;
          switch (pathIterator.currentSegment(coords))
          {
          case PathIterator.SEG_MOVETO:
              glu.gluTessBeginContour(tessellator);
              break;
          case PathIterator.SEG_LINETO:
              glu.gluTessVertex(tessellator, coords, 0, coords);
              break;
          case PathIterator.SEG_CLOSE:
              glu.gluTessEndContour(tessellator);
              break;
          }
  
          pathIterator.next();
      }
      glu.gluTessEndPolygon(tessellator);
  
      glu.gluDeleteTess(tessellator);
  }
  </code></pre>
  
  <p>If I am to believe the RedBook in Chapter 11, </p>
  
  <blockquote>
    <p>... if there is a callback associated with GLU_TESS_EDGE_FLAG that enables edge flags, the GLU_TESS_BEGIN callback is called only with GL_TRIANGLES.</p>
  </blockquote>
  
  <p>then I believe that I should only be drawing using <code>GL_TRIANGLES</code>.</p>
  
  <p>However, I can see that the type being called in my custom tessellator callbacks can be any of <code>GL_TRIANGLE_FAN</code>, <code>GL_TRIANGLE_STRIP</code> or <code>GL_TRIANGLES</code>. I only ask if there's a way to force this because I'm too pushed for time to create a VBO that can handle anything else other than <code>GL_QUADS</code> or <code>GL_TRIANGLES</code>.</p>