public void beginDraw() {
    // need to call defaults(), but can only be done when it's ok to draw
    // (i.e. for OpenGL, no drawing can be done outside beginDraw/endDraw).
    if (!settingsInited) {
      defaultSettings();

//      polygon  = new PPolygon(this);
      fpolygon = new PPolygon(this);
      spolygon = new PPolygon(this);
      spolygon.vertexCount = 4;
      svertices = new float[2][];
    }

    resetMatrix(); // reset model matrix

    // reset vertices
    vertexCount = 0;
  }