public void reset() {
    // reset these in case PGraphics was resized

    SCREEN_WIDTH = parent.width;
    SCREEN_HEIGHT = parent.height;
    //SCREEN_WIDTH1 = SCREEN_WIDTH-1;
    //SCREEN_HEIGHT1 = SCREEN_HEIGHT-1;

    m_pixels = parent.pixels;
//    m_stencil = parent.stencil;
    m_zbuffer = parent.zbuffer;

    noDepthTest = parent.hints[DISABLE_DEPTH_TEST];
    //argbSurface = parent.format == PConstants.ARGB;

    // other things to reset

    INTERPOLATE_UV = false;
    INTERPOLATE_RGB = false;
    INTERPOLATE_ALPHA = false;
    //m_tImage = null;
    m_texture = null;
    m_drawFlags = 0;
  }