aboutsummaryrefslogtreecommitdiffstats
path: root/ardor3d-jogl/src/main
diff options
context:
space:
mode:
authorJulien Gouesse <[email protected]>2013-11-04 20:54:04 +0100
committerJulien Gouesse <[email protected]>2013-11-04 20:54:04 +0100
commit0450141faeac1263c7b79a0db534a3228dbf170b (patch)
tree6accaeac333188f064f5157e47ef52440db0e9c1 /ardor3d-jogl/src/main
parente857ca2719b458140a67d2bc87cf935f05172cc5 (diff)
Improves the previous commit
Diffstat (limited to 'ardor3d-jogl/src/main')
-rw-r--r--ardor3d-jogl/src/main/java/com/ardor3d/renderer/jogl/JoglRenderer.java13
1 files changed, 8 insertions, 5 deletions
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 a1e20bd..1e15e65 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,12 +892,15 @@ public class JoglRenderer extends AbstractRenderer {
indices.position(0);
- if (gl.isGL2()) {
- if (primcount < 0) {
- gl.getGL2().glDrawElements(glIndexMode, indices.getBufferLimit(), type, indices.getBuffer());
- } else {
+ if (primcount < 0) {
+ if (gl.isGL2ES1()) {
+ gl.getGL2ES1().glDrawElements(glIndexMode, indices.getBufferLimit(), type, indices.getBuffer());
+ }
+ } else {
+ if (gl.isGL2()) {
gl.getGL2().glDrawElementsInstanced(glIndexMode, indices.getBufferLimit(), type,
indices.getBuffer(), primcount);
+
}
}
@@ -917,7 +920,7 @@ public class JoglRenderer extends AbstractRenderer {
if (gl.isGL2()) {
if (primcount < 0) {
- gl.getGL2().glDrawElements(glIndexMode, count, type, indices.getBuffer());
+ gl.getGL2ES1().glDrawElements(glIndexMode, count, type, indices.getBuffer());
} else {
gl.getGL2().glDrawElementsInstanced(glIndexMode, count, type, indices.getBuffer(), primcount);
}