diff options
-rw-r--r-- | ardor3d-jogl/pom.xml | 4 | ||||
-rw-r--r-- | ardor3d-jogl/src/main/java/com/ardor3d/renderer/jogl/JoglRenderer.java | 30 | ||||
-rw-r--r-- | ardor3d-jogl/src/main/java/com/ardor3d/scene/state/jogl/shader/JoglShaderUtil.java | 12 | ||||
-rw-r--r-- | pom.xml | 2 |
4 files changed, 23 insertions, 25 deletions
diff --git a/ardor3d-jogl/pom.xml b/ardor3d-jogl/pom.xml index 5b21057..e3271ac 100644 --- a/ardor3d-jogl/pom.xml +++ b/ardor3d-jogl/pom.xml @@ -12,12 +12,12 @@ <name>Ardor 3D JOGL</name> <!-- This repository should be used only for unreleased development versions, typically all release candidates and post builds --> - <!--<repositories> + <repositories> <repository> <id>jogamp</id> <url>http://jogamp.org/deployment/maven</url> </repository> - </repositories>--> + </repositories> <dependencies> <dependency> diff --git a/ardor3d-jogl/src/main/java/com/ardor3d/renderer/jogl/JoglRenderer.java b/ardor3d-jogl/src/main/java/com/ardor3d/renderer/jogl/JoglRenderer.java index 9dcdde4..a1e20bd 100644 --- a/ardor3d-jogl/src/main/java/com/ardor3d/renderer/jogl/JoglRenderer.java +++ b/ardor3d-jogl/src/main/java/com/ardor3d/renderer/jogl/JoglRenderer.java @@ -892,11 +892,11 @@ public class JoglRenderer extends AbstractRenderer { indices.position(0); - if (primcount < 0) { - gl.glDrawElements(glIndexMode, indices.getBufferLimit(), type, indices.getBuffer()); - } else { - if (gl.isGL2GL3()) { - gl.getGL2GL3().glDrawElementsInstanced(glIndexMode, indices.getBufferLimit(), type, + if (gl.isGL2()) { + if (primcount < 0) { + gl.getGL2().glDrawElements(glIndexMode, indices.getBufferLimit(), type, indices.getBuffer()); + } else { + gl.getGL2().glDrawElementsInstanced(glIndexMode, indices.getBufferLimit(), type, indices.getBuffer(), primcount); } } @@ -915,12 +915,11 @@ public class JoglRenderer extends AbstractRenderer { indices.getBuffer().position(offset); indices.getBuffer().limit(offset + count); - if (primcount < 0) { - gl.glDrawElements(glIndexMode, count, type, indices.getBuffer()); - } else { - if (gl.isGL2GL3()) { - gl.getGL2GL3() - .glDrawElementsInstanced(glIndexMode, count, type, indices.getBuffer(), primcount); + if (gl.isGL2()) { + if (primcount < 0) { + gl.getGL2().glDrawElements(glIndexMode, count, type, indices.getBuffer()); + } else { + gl.getGL2().glDrawElementsInstanced(glIndexMode, count, type, indices.getBuffer(), primcount); } } @@ -1419,8 +1418,8 @@ public class JoglRenderer extends AbstractRenderer { if (primcount < 0) { gl.glDrawElements(glIndexMode, indices.getBufferLimit(), type, 0); } else { - if (gl.isGL2GL3()) { - gl.getGL2GL3().glDrawElementsInstanced(glIndexMode, indices.getBufferLimit(), type, + if (gl.isGL2()) { + gl.getGL2().glDrawElementsInstanced(glIndexMode, indices.getBufferLimit(), type, indices.getBuffer(), primcount); } } @@ -1446,9 +1445,8 @@ public class JoglRenderer extends AbstractRenderer { } else { final int previousPos = indices.getBuffer().position(); indices.getBuffer().position(offset * byteSize); - if (gl.isGL2GL3()) { - gl.getGL2GL3() - .glDrawElementsInstanced(glIndexMode, count, type, indices.getBuffer(), primcount); + if (gl.isGL2()) { + gl.getGL2().glDrawElementsInstanced(glIndexMode, count, type, indices.getBuffer(), primcount); } indices.getBuffer().position(previousPos); } diff --git a/ardor3d-jogl/src/main/java/com/ardor3d/scene/state/jogl/shader/JoglShaderUtil.java b/ardor3d-jogl/src/main/java/com/ardor3d/scene/state/jogl/shader/JoglShaderUtil.java index 4748cd3..3931796 100644 --- a/ardor3d-jogl/src/main/java/com/ardor3d/scene/state/jogl/shader/JoglShaderUtil.java +++ b/ardor3d-jogl/src/main/java/com/ardor3d/scene/state/jogl/shader/JoglShaderUtil.java @@ -363,7 +363,7 @@ public abstract class JoglShaderUtil { variable.data.getBuffer().rewind(); GLContext .getCurrentGL() - .getGL2ES2() + .getGL2() .glVertexAttribPointer(variable.variableID, variable.size, GL.GL_FLOAT, variable.normalized, variable.stride, variable.data.getBuffer()); } @@ -387,8 +387,8 @@ public abstract class JoglShaderUtil { } else { variable.data.getBuffer().limit(pos + length - 1); variable.data.getBuffer().position(pos); - gl.getGL2ES2().glVertexAttribPointer(variable.variableID + i, size, GL.GL_FLOAT, variable.normalized, - 0, variable.data.getBuffer()); + gl.getGL2().glVertexAttribPointer(variable.variableID + i, size, GL.GL_FLOAT, variable.normalized, 0, + variable.data.getBuffer()); } } } @@ -410,7 +410,7 @@ public abstract class JoglShaderUtil { variable.data.getBuffer().rewind(); GLContext .getCurrentGL() - .getGL2ES2() + .getGL2() .glVertexAttribPointer(variable.variableID, variable.size, variable.unsigned ? GL.GL_UNSIGNED_BYTE : GL.GL_BYTE, variable.normalized, variable.stride, variable.data.getBuffer()); @@ -434,7 +434,7 @@ public abstract class JoglShaderUtil { variable.data.getBuffer().rewind(); GLContext .getCurrentGL() - .getGL2ES2() + .getGL2() .glVertexAttribPointer(variable.variableID, variable.size, variable.unsigned ? GL.GL_UNSIGNED_INT : GL2ES2.GL_INT, variable.normalized, variable.stride, variable.data.getBuffer()); @@ -458,7 +458,7 @@ public abstract class JoglShaderUtil { variable.data.getBuffer().rewind(); GLContext .getCurrentGL() - .getGL2ES2() + .getGL2() .glVertexAttribPointer(variable.variableID, variable.size, variable.unsigned ? GL.GL_UNSIGNED_SHORT : GL.GL_SHORT, variable.normalized, variable.stride, variable.data.getBuffer()); @@ -239,7 +239,7 @@ <!-- these properties help simplify specifying some commonly occurring variables --> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <jogamp.version>2.0.2</jogamp.version> + <jogamp.version>2.1.2-rc-20131031</jogamp.version> <lwjgl.version>2.8.4</lwjgl.version> <swt.version>3650</swt.version> </properties> |