// gl.glStencilFunc(GL.GL_EQUAL, 0x01, 0x01);
if (useGradient){
gl.glBegin (GL.GL_QUADS);
gl.glColor4f(x1R, x1G, x1B, x1A);
gl.glVertex3d (minX, minY, 0.0);
gl.glColor4f(x2R, x2G, x2B, x2A);
gl.glVertex3d (maxX, minY, 0.0);
gl.glColor4f(x3R, x3G, x3B, x3A);
gl.glVertex3d (maxX, maxY, 0.0);
gl.glColor4f(x4R, x4G, x4B, x4A);