本文整理了Java中com.jme3.scene.Mesh.getPatchVertexCount()
方法的一些代码示例,展示了Mesh.getPatchVertexCount()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Mesh.getPatchVertexCount()
方法的具体详情如下:
包路径:com.jme3.scene.Mesh
类名称:Mesh
方法名:getPatchVertexCount
[英]Gets the amount of vertices used for each patch;
[中]获取每个面片使用的顶点数量;
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
public void renderMesh(Mesh mesh, int lod, int count, VertexBuffer[] instanceData) {
if (mesh.getVertexCount() == 0 || mesh.getTriangleCount() == 0 || count == 0) {
return;
}
if (count > 1 && !caps.contains(Caps.MeshInstancing)) {
throw new RendererException("Mesh instancing is not supported by the video hardware");
}
if (mesh.getLineWidth() != 1f && context.lineWidth != mesh.getLineWidth()) {
gl.glLineWidth(mesh.getLineWidth());
context.lineWidth = mesh.getLineWidth();
}
if (gl4 != null && mesh.getMode().equals(Mode.Patch)) {
gl4.glPatchParameter(mesh.getPatchVertexCount());
}
statistics.onMeshDrawn(mesh, lod, count);
// if (ctxCaps.GL_ARB_vertex_array_object){
// renderMeshVertexArray(mesh, lod, count);
// }else{
renderMeshDefault(mesh, lod, count, instanceData);
// }
}
代码示例来源:origin: org.jmonkeyengine/jme3-core
public void renderMesh(Mesh mesh, int lod, int count, VertexBuffer[] instanceData) {
if (mesh.getVertexCount() == 0 || mesh.getTriangleCount() == 0 || count == 0) {
return;
}
if (count > 1 && !caps.contains(Caps.MeshInstancing)) {
throw new RendererException("Mesh instancing is not supported by the video hardware");
}
if (mesh.getLineWidth() != 1f && context.lineWidth != mesh.getLineWidth()) {
gl.glLineWidth(mesh.getLineWidth());
context.lineWidth = mesh.getLineWidth();
}
if (gl4 != null && mesh.getMode().equals(Mode.Patch)) {
gl4.glPatchParameter(mesh.getPatchVertexCount());
}
statistics.onMeshDrawn(mesh, lod, count);
// if (ctxCaps.GL_ARB_vertex_array_object){
// renderMeshVertexArray(mesh, lod, count);
// }else{
renderMeshDefault(mesh, lod, count, instanceData);
// }
}
内容来源于网络,如有侵权,请联系作者删除!