public static void glDrawElementsBaseVertex(int mode, ShortBuffer indices, int basevertex) {
   ContextCapabilities caps = GLContext.getCapabilities();
   long function_pointer = caps.ARB_draw_elements_base_vertex_glDrawElementsBaseVertex_pointer;
   BufferChecks.checkFunctionAddress(function_pointer);
   GLChecks.ensureElementVBOdisabled(caps);
   BufferChecks.checkDirect(indices);
   nglDrawElementsBaseVertex(
       mode,
       (indices.remaining()),
       GL11.GL_UNSIGNED_SHORT,
       indices,
       indices.position() << 1,
       basevertex,
       function_pointer);
 }
Example #2
0
 public static void glDrawElementsInstancedBaseInstance(
     int mode, ShortBuffer indices, int primcount, int baseinstance) {
   ContextCapabilities caps = GLContext.getCapabilities();
   long function_pointer = caps.glDrawElementsInstancedBaseInstance;
   BufferChecks.checkFunctionAddress(function_pointer);
   GLChecks.ensureElementVBOdisabled(caps);
   BufferChecks.checkDirect(indices);
   nglDrawElementsInstancedBaseInstance(
       mode,
       indices.remaining(),
       GL11.GL_UNSIGNED_SHORT,
       MemoryUtil.getAddress(indices),
       primcount,
       baseinstance,
       function_pointer);
 }