本文整理了Java中com.jme3.renderer.Renderer.renderMesh
方法的一些代码示例,展示了Renderer.renderMesh
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Renderer.renderMesh
方法的具体详情如下:
包路径:com.jme3.renderer.Renderer
类名称:Renderer
方法名:renderMesh
[英]Renders count
meshes, with the geometry data supplied. The shader which is currently set with setShader
is responsible for transforming the input verticies into clip space and shading it based on the given vertex attributes. The int variable gl_InstanceID can be used to access the current instance of the mesh being rendered inside the vertex shader.
[中]使用提供的几何体数据渲染count
网格。当前设置为setShader
的着色器负责将输入垂直变换为剪辑空间,并基于给定的顶点属性对其进行着色。int变量gl_InstanceID可用于访问顶点着色器内正在渲染的网格的当前实例。
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
public static void renderMeshFromGeometry(Renderer renderer, Geometry geom) {
Mesh mesh = geom.getMesh();
int lodLevel = geom.getLodLevel();
if (geom instanceof InstancedGeometry) {
InstancedGeometry instGeom = (InstancedGeometry) geom;
renderer.renderMesh(mesh, lodLevel, instGeom.getActualNumInstances(),
instGeom.getAllInstanceData());
} else {
renderer.renderMesh(mesh, lodLevel, 1, null);
}
}
代码示例来源:origin: org.jmonkeyengine/jme3-core
public static void renderMeshFromGeometry(Renderer renderer, Geometry geom) {
Mesh mesh = geom.getMesh();
int lodLevel = geom.getLodLevel();
if (geom instanceof InstancedGeometry) {
InstancedGeometry instGeom = (InstancedGeometry) geom;
renderer.renderMesh(mesh, lodLevel, instGeom.getActualNumInstances(),
instGeom.getAllInstanceData());
} else {
renderer.renderMesh(mesh, lodLevel, 1, null);
}
}
代码示例来源:origin: info.projectkyoto/mms-engine
r.renderMesh(g.getMesh(), g.getLodLevel(), 1);
lightPos.setValue(VarType.Vector4, nullDirLight);
r.setShader(shader);
r.renderMesh(g.getMesh(), g.getLodLevel(), 1);
代码示例来源:origin: info.projectkyoto/mms-engine
r.renderMesh(geom.getMesh(), geom.getLodLevel(), 1);
内容来源于网络,如有侵权,请联系作者删除!