Android Open Source - Processing-Android-Eclipse-Demos P G L U






From Project

Back to project page Processing-Android-Eclipse-Demos.

License

The source code is released under:

MIT License

If you think the Android project Processing-Android-Eclipse-Demos listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.processing.opengl.tess;
//w  w w  .  j a  v  a 2 s  .c  om
import android.opengl.GLES20;

public class PGLU {
  public static final int GLU_FALSE = 0;  
  public static final int GLU_TRUE  = 1;
  
  public static final int GLU_INVALID_ENUM      = 100900;  
  public static final int GLU_INVALID_VALUE     = 100901;  
  public static final int GLU_OUT_OF_MEMORY     = 100902;  
  public static final int GLU_INVALID_OPERATION = 100904;
  
  public static final int GLU_POINT      = 100010;  
  public static final int GLU_LINE       = 100011;  
  public static final int GLU_FILL       = 100012;  
  public static final int GLU_SILHOUETTE = 100013;
  
  public static final int GLU_SMOOTH = 100000;  
  public static final int GLU_FLAT   = 100001;
  public static final int GLU_NONE   = 100002;
  
  public static final int GLU_OUTSIDE = 100020;  
  public static final int GLU_INSIDE  = 100021;
  
  public static final int GLU_ERROR      = 100103;
  public static final int GLU_TESS_ERROR = 100103;
  
  public static final int GLU_TESS_BEGIN  = 100100;  
  public static final int GLU_BEGIN       = 100100;  
  public static final int GLU_TESS_VERTEX = 100101;  
  public static final int GLU_VERTEX      = 100101;  
  public static final int GLU_TESS_END    = 100102;  
  public static final int GLU_END         = 100102;
  
  public static final int GLU_TESS_EDGE_FLAG = 100104;  
  public static final int GLU_EDGE_FLAG = 100104;    
  public static final int GLU_TESS_COMBINE = 100105;  
  public static final int GLU_TESS_BEGIN_DATA = 100106;  
  public static final int GLU_TESS_VERTEX_DATA = 100107;  
  public static final int GLU_TESS_END_DATA = 100108;  
  public static final int GLU_TESS_ERROR_DATA = 100109;  
  public static final int GLU_TESS_EDGE_FLAG_DATA = 100110;  
  public static final int GLU_TESS_COMBINE_DATA = 100111;
  
  public static final int GLU_CW                              = 100120;  
  public static final int GLU_CCW                             = 100121;  
  public static final int GLU_INTERIOR                        = 100122;  
  public static final int GLU_EXTERIOR                        = 100123;  
  public static final int GLU_UNKNOWN                         = 100124;  
  public static final int GLU_TESS_WINDING_RULE               = 100140;
  public static final int GLU_TESS_BOUNDARY_ONLY              = 100141;  
  public static final int GLU_TESS_TOLERANCE                  = 100142;  
  public static final int GLU_TESS_AVOID_DEGENERATE_TRIANGLES = 100149;
  
  public static final int GLU_TESS_ERROR1 = 100151;  
  public static final int GLU_TESS_ERROR2 = 100152;  
  public static final int GLU_TESS_ERROR3 = 100153;  
  public static final int GLU_TESS_ERROR4 = 100154;  
  public static final int GLU_TESS_ERROR5 = 100155;  
  public static final int GLU_TESS_ERROR6 = 100156;  
  public static final int GLU_TESS_ERROR7 = 100157;  
  public static final int GLU_TESS_ERROR8 = 100158;
  
  public static final int GLU_TESS_MISSING_BEGIN_POLYGON = 100151;  
  public static final int GLU_TESS_MISSING_BEGIN_CONTOUR = 100152;  
  public static final int GLU_TESS_MISSING_END_POLYGON   = 100153;  
  public static final int GLU_TESS_MISSING_END_CONTOUR   = 100154;  
  public static final int GLU_TESS_COORD_TOO_LARGE       = 100155;  
  public static final int GLU_TESS_NEED_COMBINE_CALLBACK = 100156;
  
  public static final int GLU_TESS_WINDING_ODD         = 100130;  
  public static final int GLU_TESS_WINDING_NONZERO     = 100131;  
  public static final int GLU_TESS_WINDING_POSITIVE    = 100132;  
  public static final int GLU_TESS_WINDING_NEGATIVE    = 100133;  
  public static final int GLU_TESS_WINDING_ABS_GEQ_TWO = 100134;
  
  public static final double GLU_TESS_MAX_COORD = 1.0E150;

  private static String[] glErrorStrings = {
    "invalid enumerant",
    "invalid value",
    "invalid operation",
    "stack overflow",
    "stack underflow",
    "out of memory",
    "invalid framebuffer operation"
  };
  
  private static String[] gluErrorStrings = {
    "invalid enumerant",
    "invalid value",
    "out of memory",
    "",
    "invalid operation"
  };  
  
  private static String[] gluTessErrors = {
    " ",
    "gluTessBeginPolygon() must precede a gluTessEndPolygon",
    "gluTessBeginContour() must precede a gluTessEndContour()",
    "gluTessEndPolygon() must follow a gluTessBeginPolygon()",
    "gluTessEndContour() must follow a gluTessBeginContour()",
    "a coordinate is too large",
    "need combine callback"
  };  
  
  public static final PGLUtessellator gluNewTess() {
    return GLUtessellatorImpl.gluNewTess();
  }  
  
  public static final void gluTessCallback(PGLUtessellator tess, int which, PGLUtessellatorCallback callback) {
    ((GLUtessellatorImpl)tess).gluTessCallback(which, callback);
  }

  public static final void gluTessBeginPolygon(PGLUtessellator tess, Object data) {
    ((GLUtessellatorImpl)tess).gluTessBeginPolygon(data); 
  }
  
  public static final void gluTessEndPolygon(PGLUtessellator tess) {
    ((GLUtessellatorImpl)tess).gluTessEndPolygon();    
  }
                                                                                                                                                
  public static final void gluTessProperty(PGLUtessellator tess, int which, double value) {
    ((GLUtessellatorImpl)tess).gluTessProperty(which, value);
  }

  public static final void gluTessBeginContour(PGLUtessellator tess) {
    ((GLUtessellatorImpl)tess).gluTessBeginContour();
  }

  public static final void gluTessEndContour(PGLUtessellator tess) {
    ((GLUtessellatorImpl)tess).gluTessEndContour();
  }

  public static final void gluTessVertex(PGLUtessellator tess, double[] coords, int offset, Object vdata) {
    ((GLUtessellatorImpl)tess).gluTessVertex(coords, offset, vdata);
  }

  public static String gluErrorString( int errorCode ) {
    if( errorCode == 0 ) {
      return ("no error");
    }
    if( (errorCode >= GLES20.GL_INVALID_ENUM) && (errorCode <= GLES20.GL_INVALID_FRAMEBUFFER_OPERATION) ) {
      return (glErrorStrings[errorCode - GLES20.GL_INVALID_ENUM]);
    }
    if( errorCode == 0x8031 /* GL.GL_TABLE_TOO_LARGE */ ) {
      return ("table too large");
    }
    if( (errorCode >= GLU_INVALID_ENUM) && (errorCode <= GLU_INVALID_OPERATION) ) {
      return (gluErrorStrings[errorCode - GLU_INVALID_ENUM]);
    }
    if( (errorCode >= GLU_TESS_ERROR1) && (errorCode <= GLU_TESS_ERROR8) ) {
        return (gluTessErrors[errorCode - (GLU_TESS_ERROR1 - 1)]);
    }
    return ("error ("+errorCode+")");
  }  
}




Java Source Code List

.AccelerometerManager.java
.CompassManager.java
com.processing.core.PApplet.java
com.processing.core.PConstants.java
com.processing.core.PFont.java
com.processing.core.PGraphicsAndroid2D.java
com.processing.core.PGraphics.java
com.processing.core.PImage.java
com.processing.core.PMatrix2D.java
com.processing.core.PMatrix3D.java
com.processing.core.PMatrix.java
com.processing.core.PShapeOBJ.java
com.processing.core.PShapeSVG.java
com.processing.core.PShape.java
com.processing.core.PStyle.java
com.processing.core.PVector.java
com.processing.data.FloatDict.java
com.processing.data.FloatList.java
com.processing.data.IntDict.java
com.processing.data.IntList.java
com.processing.data.JSONArray.java
com.processing.data.JSONObject.java
com.processing.data.JSONTokener.java
com.processing.data.Sort.java
com.processing.data.StringDict.java
com.processing.data.StringList.java
com.processing.data.TableRow.java
com.processing.data.Table.java
com.processing.data.XML.java
com.processing.event.Event.java
com.processing.event.KeyEvent.java
com.processing.event.MouseEvent.java
com.processing.event.TouchEvent.java
com.processing.opengl.FontTexture.java
com.processing.opengl.FrameBuffer.java
com.processing.opengl.LinePath.java
com.processing.opengl.LineStroker.java
com.processing.opengl.PGLES.java
com.processing.opengl.PGL.java
com.processing.opengl.PGraphics2D.java
com.processing.opengl.PGraphics3D.java
com.processing.opengl.PGraphicsOpenGL.java
com.processing.opengl.PShader.java
com.processing.opengl.PShapeOpenGL.java
com.processing.opengl.Texture.java
com.processing.opengl.tess.ActiveRegion.java
com.processing.opengl.tess.CachedVertex.java
com.processing.opengl.tess.DictNode.java
com.processing.opengl.tess.Dict.java
com.processing.opengl.tess.GLUface.java
com.processing.opengl.tess.GLUhalfEdge.java
com.processing.opengl.tess.GLUmesh.java
com.processing.opengl.tess.GLUtessellatorImpl.java
com.processing.opengl.tess.GLUvertex.java
com.processing.opengl.tess.Geom.java
com.processing.opengl.tess.Mesh.java
com.processing.opengl.tess.Normal.java
com.processing.opengl.tess.PGLU.java
com.processing.opengl.tess.PGLUtessellatorCallbackAdapter.java
com.processing.opengl.tess.PGLUtessellatorCallback.java
com.processing.opengl.tess.PGLUtessellator.java
com.processing.opengl.tess.PriorityQHeap.java
com.processing.opengl.tess.PriorityQSort.java
com.processing.opengl.tess.PriorityQ.java
com.processing.opengl.tess.Render.java
com.processing.opengl.tess.Sweep.java
com.processing.opengl.tess.TessMono.java
com.processing.opengl.tess.TessState.java
processing.mode.android.AVD.java
processing.mode.android.AndroidBuild.java
processing.mode.android.AndroidEditor.java
processing.mode.android.AndroidMode.java
processing.mode.android.AndroidPreprocessor.java
processing.mode.android.AndroidRunner.java
processing.mode.android.AndroidSDK.java
processing.mode.android.AndroidToolbar.java
processing.mode.android.BadSDKException.java
processing.mode.android.Commander.java
processing.mode.android.DeviceListener.java
processing.mode.android.Device.java
processing.mode.android.Devices.java
processing.mode.android.EmulatorController.java
processing.mode.android.Export.java
processing.mode.android.Keys.java
processing.mode.android.LogEntry.java
processing.mode.android.Manifest.java
processing.mode.android.Permissions.java