gl.glTexImage3D(GL2.GL_TEXTURE_3D,
level, internalFormat,
width, height, depth, boundaryWidth,
format, type, IntBuffer.wrap((int[]) data));
} else {
gl.glTexImage3D(GL2.GL_TEXTURE_3D,
level, internalFormat,
width, height, depth, boundaryWidth,
format, type, (Buffer) data);
}