aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/jogamp/java3d/Jogl2es2DEPPipeline.java1
-rw-r--r--src/main/java/org/jogamp/java3d/Jogl2es2Pipeline.java39
2 files changed, 35 insertions, 5 deletions
diff --git a/src/main/java/org/jogamp/java3d/Jogl2es2DEPPipeline.java b/src/main/java/org/jogamp/java3d/Jogl2es2DEPPipeline.java
index b9d8066..d702517 100644
--- a/src/main/java/org/jogamp/java3d/Jogl2es2DEPPipeline.java
+++ b/src/main/java/org/jogamp/java3d/Jogl2es2DEPPipeline.java
@@ -32,7 +32,6 @@ abstract class Jogl2es2DEPPipeline extends Pipeline
+ "Coordinates must be defined and float type, colors must be float type, if defined. \n"//
+ "Decaling is not supported. \n"//
+ "Model Clip is not supported and must be reimplemented in shaders \n"//
- + "QuadArray or IndexedQuadArray cannot be supported. \n"//
+ "Texture Coordinate generation ignored, must be done in shaders. \n" //
+ "Texture Lod, Filter, Sharpen and Combine cannot be supported. \n"//
+ "Texture3D cannot be supported. \n"//
diff --git a/src/main/java/org/jogamp/java3d/Jogl2es2Pipeline.java b/src/main/java/org/jogamp/java3d/Jogl2es2Pipeline.java
index 934e9b8..de2af22 100644
--- a/src/main/java/org/jogamp/java3d/Jogl2es2Pipeline.java
+++ b/src/main/java/org/jogamp/java3d/Jogl2es2Pipeline.java
@@ -121,6 +121,9 @@ class Jogl2es2Pipeline extends Jogl2es2DEPPipeline
// setPosition on a GLWindow can lock-up if true
// also with on and offscreen must be false too
private static final boolean NEVER_RELEASE_CONTEXT = false;
+
+
+ private static boolean quadArrayCautionPrinted = false;
/**
* Constructor for singleton JoglPipeline instance
@@ -761,7 +764,14 @@ class Jogl2es2Pipeline extends Jogl2es2DEPPipeline
switch (geo_type)
{
case GeometryRetained.GEO_TYPE_QUAD_SET:
- System.err.println("QuadArray.\n" + VALID_FORMAT_MESSAGE);
+ if(!quadArrayCautionPrinted) {
+ System.err.println("QuadArray will render incorrectly, consider using TriangleArray. If you have the java3d-utils in the buildpath you can convert like this:");
+ System.err.println("GeometryInfo gi = new GeometryInfo(quadArray);");
+ System.err.println("gi.convertToIndexedTriangles(); ");
+ System.err.println("GeometryArray ga = gi.getIndexedGeometryArray(true, true, true, true, true);");
+ quadArrayCautionPrinted = true;
+ }
+ //fallthrough
case GeometryRetained.GEO_TYPE_TRI_SET:
gl.glDrawArrays(GL2ES2.GL_TRIANGLES, 0, vcount);
break;
@@ -1468,7 +1478,14 @@ class Jogl2es2Pipeline extends Jogl2es2DEPPipeline
switch (geo_type)
{
case GeometryRetained.GEO_TYPE_QUAD_SET:
- System.err.println("QuadArray.\n" + VALID_FORMAT_MESSAGE);
+ if(!quadArrayCautionPrinted) {
+ System.err.println("QuadArray will render incorrectly, consider using TriangleArray. If you have the java3d-utils in the buildpath you can convert like this:");
+ System.err.println("GeometryInfo gi = new GeometryInfo(quadArray);");
+ System.err.println("gi.convertToIndexedTriangles(); ");
+ System.err.println("GeometryArray ga = gi.getIndexedGeometryArray(true, true, true, true, true);");
+ quadArrayCautionPrinted = true;
+ }
+ //fallthrough
case GeometryRetained.GEO_TYPE_TRI_SET:
gl.glDrawArrays(GL2ES2.GL_TRIANGLES, 0, vertexCount);
break;
@@ -2110,7 +2127,14 @@ class Jogl2es2Pipeline extends Jogl2es2DEPPipeline
switch (geo_type)
{
case GeometryRetained.GEO_TYPE_INDEXED_QUAD_SET:
- throw new UnsupportedOperationException("QuadArray.\n" + VALID_FORMAT_MESSAGE);
+ if(!quadArrayCautionPrinted) {
+ System.err.println("QuadArray will render incorrectly, consider using TriangleArray. If you have the java3d-utils in the buildpath you can convert like this:");
+ System.err.println("GeometryInfo gi = new GeometryInfo(quadArray);");
+ System.err.println("gi.convertToIndexedTriangles(); ");
+ System.err.println("GeometryArray ga = gi.getIndexedGeometryArray(true, true, true, true, true);");
+ quadArrayCautionPrinted = true;
+ }
+ //fallthrough
case GeometryRetained.GEO_TYPE_INDEXED_TRI_SET:
gl.glDrawElements(GL2ES2.GL_TRIANGLES, indexCount, GL2ES2.GL_UNSIGNED_SHORT, 0);
break;
@@ -2886,7 +2910,14 @@ class Jogl2es2Pipeline extends Jogl2es2DEPPipeline
switch (geo_type)
{
case GeometryRetained.GEO_TYPE_INDEXED_QUAD_SET:
- throw new UnsupportedOperationException("QuadArray.\n" + VALID_FORMAT_MESSAGE);
+ if(!quadArrayCautionPrinted) {
+ System.err.println("QuadArray will render incorrectly, consider using TriangleArray. If you have the java3d-utils in the buildpath you can convert like this:");
+ System.err.println("GeometryInfo gi = new GeometryInfo(quadArray);");
+ System.err.println("gi.convertToIndexedTriangles(); ");
+ System.err.println("GeometryArray ga = gi.getIndexedGeometryArray(true, true, true, true, true);");
+ quadArrayCautionPrinted = true;
+ }
+ //fallthrough
case GeometryRetained.GEO_TYPE_INDEXED_TRI_SET:
gl.glDrawElements(GL2ES2.GL_TRIANGLES, validIndexCount, GL2ES2.GL_UNSIGNED_SHORT, 0);
break;