Java 类org.lwjgl.opengl.ARBDrawInstanced 实例源码

项目:PhET    文件:LwjglRenderer.java   
public void drawTriangleArray(Mesh.Mode mode, int count, int vertCount) {
    if (count > 1) {
        ARBDrawInstanced.glDrawArraysInstancedARB(convertElementMode(mode), 0,
                vertCount, count);
    } else {
        glDrawArrays(convertElementMode(mode), 0, vertCount);
    }
}
项目:LWJGL-OpenGL-Utils    文件:RenderUtils.java   
public static void glDrawArraysInstanced(int mode, int first, int count, int primcount) {
    if(GL_VERSION >= 31) {
        GL31.glDrawArraysInstanced(mode, first, count, primcount);
    }
    else if(GLContext.getCapabilities().GL_ARB_draw_instanced) {
        ARBDrawInstanced.glDrawArraysInstancedARB(mode, first, count, primcount);
    }
    else {
        throw new UnsupportedOperationException("GL_ARB_draw_instanced not supported on this system.");
    }
}
项目:LWJGL-OpenGL-Utils    文件:RenderUtils.java   
public static void glDrawElementsInstanced(int mode, int indices_count, int type, long indices_buffer_offset, int primcount) {
    if(GL_VERSION >= 31) {
        GL31.glDrawElementsInstanced(mode, indices_count, type, indices_buffer_offset, primcount);
    }
    else if(GLContext.getCapabilities().GL_ARB_draw_instanced) {
        ARBDrawInstanced.glDrawElementsInstancedARB(mode, indices_count, type, indices_buffer_offset, primcount);
    }
    else {
        throw new UnsupportedOperationException("GL_ARB_draw_instanced not supported on this system.");
    }
}
项目:MikuMikuStudio    文件:LwjglRenderer.java   
public void drawTriangleArray(Mesh.Mode mode, int count, int vertCount) {
    if (count > 1) {
        ARBDrawInstanced.glDrawArraysInstancedARB(convertElementMode(mode), 0,
                vertCount, count);
    } else {
        glDrawArrays(convertElementMode(mode), 0, vertCount);
    }
}
项目:OpenModsLib    文件:ArraysHelper.java   
@Override
public void glDrawArraysInstanced(int mode, int first, int count, int primcount) {
    ARBDrawInstanced.glDrawArraysInstancedARB(mode, first, count, primcount);
}