本文整理汇总了Java中org.lwjgl.opengl.GL31.glDrawArraysInstanced方法的典型用法代码示例。如果您正苦于以下问题:Java GL31.glDrawArraysInstanced方法的具体用法?Java GL31.glDrawArraysInstanced怎么用?Java GL31.glDrawArraysInstanced使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.lwjgl.opengl.GL31
的用法示例。
在下文中一共展示了GL31.glDrawArraysInstanced方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: render
import org.lwjgl.opengl.GL31; //导入方法依赖的package包/类
protected void render(Map<ParticleTexture, List<Particle>> particles, Camera camera) {
Matrix4f viewMatrix = Maths.createViewMatrix(camera);
prepare();
for (ParticleTexture texture : particles.keySet()) {
bindTexture(texture);
List<Particle> particleList = particles.get(texture);
pointer = 0;
float[] vboData = new float[particleList.size() * INSTANCE_DATA_LENGHT];
for (Particle particle : particleList) {
updateModelViewMatrix(particle.getPosition(), particle.getRotation(), particle.getScale(), viewMatrix,
vboData);
updateTexCoordInfo(particle, vboData);
}
loader.updateVbo(vbo, vboData, buffer);
GL31.glDrawArraysInstanced(GL11.GL_TRIANGLE_STRIP, 0, quad.getVertexCount(), particleList.size());
}
finishRendering();
}
示例2: glDrawArraysInstanced
import org.lwjgl.opengl.GL31; //导入方法依赖的package包/类
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.");
}
}
示例3: glDrawArraysInstanced
import org.lwjgl.opengl.GL31; //导入方法依赖的package包/类
@Override
public void glDrawArraysInstanced (int mode, int first, int count, int instanceCount) {
GL31.glDrawArraysInstanced(mode, first, count, instanceCount);
}
示例4: glhDrawArraysInstanced
import org.lwjgl.opengl.GL31; //导入方法依赖的package包/类
public static void glhDrawArraysInstanced(int mode, int first, int count, int primcount) {
GL31.glDrawArraysInstanced(mode, first, count, primcount);
theContext.incrementDrawCalls();
theContext.increaseVerticesDrawn(3 * count);
}
示例5: glDrawArraysInstanced
import org.lwjgl.opengl.GL31; //导入方法依赖的package包/类
@Override
public void glDrawArraysInstanced(int mode, int first, int count, int primcount) {
GL31.glDrawArraysInstanced(mode, first, count, primcount);
}
示例6: glDrawArraysInstanced
import org.lwjgl.opengl.GL31; //导入方法依赖的package包/类
public static void glDrawArraysInstanced(int mode, int first, int argcount, int primcount) throws GLException
{
GL31.glDrawArraysInstanced(mode, first, argcount, primcount);
RenderHelper.checkForGLError();
}