Switches to JOGL 2.1.2
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10874 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
e3651d8f96
commit
f49992d15b
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1069,13 +1069,13 @@ public class JoglGL1Renderer implements GL1Renderer {
|
|||||||
GL gl = GLContext.getCurrentGL();
|
GL gl = GLContext.getCurrentGL();
|
||||||
switch (format) {
|
switch (format) {
|
||||||
case GL.GL_UNSIGNED_BYTE:
|
case GL.GL_UNSIGNED_BYTE:
|
||||||
gl.glDrawElements(mode, data.limit(), format, (ByteBuffer) data);
|
gl.getGL2().glDrawElements(mode, data.limit(), format, (ByteBuffer) data);
|
||||||
break;
|
break;
|
||||||
case GL.GL_UNSIGNED_SHORT:
|
case GL.GL_UNSIGNED_SHORT:
|
||||||
gl.glDrawElements(mode, data.limit(), format, (ShortBuffer) data);
|
gl.getGL2().glDrawElements(mode, data.limit(), format, (ShortBuffer) data);
|
||||||
break;
|
break;
|
||||||
case GL.GL_UNSIGNED_INT:
|
case GL.GL_UNSIGNED_INT:
|
||||||
gl.glDrawElements(mode, data.limit(), format, (IntBuffer) data);
|
gl.getGL2().glDrawElements(mode, data.limit(), format, (IntBuffer) data);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new UnsupportedOperationException();
|
throw new UnsupportedOperationException();
|
||||||
|
@ -2340,11 +2340,11 @@ public class JoglRenderer implements Renderer {
|
|||||||
int elementLength = elementLengths[i];
|
int elementLength = elementLengths[i];
|
||||||
|
|
||||||
if (useInstancing) {
|
if (useInstancing) {
|
||||||
if (gl.isGL2GL3()) {
|
if (gl.isGL2()) {
|
||||||
indexBuf.getData().position(curOffset);
|
indexBuf.getData().position(curOffset);
|
||||||
indexBuf.getData().limit(curOffset + elementLength);
|
indexBuf.getData().limit(curOffset + elementLength);
|
||||||
|
|
||||||
gl.getGL2GL3().glDrawElementsInstanced(elMode,
|
gl.getGL2().glDrawElementsInstanced(elMode,
|
||||||
elementLength,
|
elementLength,
|
||||||
fmt,
|
fmt,
|
||||||
indexBuf.getData(),
|
indexBuf.getData(),
|
||||||
@ -2363,7 +2363,7 @@ public class JoglRenderer implements Renderer {
|
|||||||
curOffset);
|
curOffset);
|
||||||
} else {
|
} else {
|
||||||
indexBuf.getData().position(curOffset);
|
indexBuf.getData().position(curOffset);
|
||||||
gl.glDrawElements(elMode, elementLength, fmt,
|
gl.getGL2().glDrawElements(elMode, elementLength, fmt,
|
||||||
indexBuf.getData());
|
indexBuf.getData());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2373,8 +2373,8 @@ public class JoglRenderer implements Renderer {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (useInstancing) {
|
if (useInstancing) {
|
||||||
if (gl.isGL2GL3()) {
|
if (gl.isGL2()) {
|
||||||
gl.getGL2GL3().glDrawElementsInstanced(convertElementMode(mesh.getMode()),
|
gl.getGL2().glDrawElementsInstanced(convertElementMode(mesh.getMode()),
|
||||||
indexBuf.getData().limit(),
|
indexBuf.getData().limit(),
|
||||||
convertFormat(indexBuf.getFormat()),
|
convertFormat(indexBuf.getFormat()),
|
||||||
indexBuf.getData(),
|
indexBuf.getData(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user