private static String calcMeshMaterial(final Mesh mesh) { final StringBuilder material = new StringBuilder(); // First, check if we are lit or not final LightState ls = mesh.getWorldRenderState(StateType.Light); final boolean lit = (ls != null && ls.isEnabled() && ls.count() > 0); material.append(lit ? "lit/" : "unlit/"); // Now check if we are textured final TextureState ts = mesh.getWorldRenderState(StateType.Texture); final boolean textured = (ts != null && ts.isEnabled() && ts.getNumberOfSetTextures() > 0); material.append(textured ? "textured/" : "untextured/"); // Check if we are using vertex colors final boolean vertColor = mesh.getMeshData().containsKey(MeshData.KEY_ColorCoords); material.append(vertColor ? "vertex_color" : "basic"); material.append(lit ? "_phong" : ""); // Finally, check if we are using fog final boolean foggy = mesh.hasProperty(FogParams.DefaultPropertyKey); material.append(foggy ? "_fog" : ""); material.append(".yaml"); System.out.println(material + " - " + mesh.getName()); return material.toString(); } }
if (mesh.getLocalRenderState(StateType.Texture) != null) { final TextureState textureState = (TextureState) mesh.getLocalRenderState(StateType.Texture); if (textureState.isEnabled() && textureState.getTexture() != null) { final TextureKey tKey = textureState.getTexture().getTextureKey(); final String tmpTextureName = tKey.getSource().getName();
for (int iIndex = states.length - 1; iIndex >= 0; iIndex--) { final TextureState pkTState = (TextureState) states[iIndex]; if (!pkTState.isEnabled()) { if (mode == TextureCombineMode.CombineClosestEnabled) { break; for (int iIndex = 0, max = states.length; iIndex < max; iIndex++) { final TextureState pkTState = (TextureState) states[iIndex]; if (!pkTState.isEnabled()) { continue;
for (int iIndex = states.length - 1; iIndex >= 0; iIndex--) { final TextureState pkTState = (TextureState) states[iIndex]; if (!pkTState.isEnabled()) { if (mode == TextureCombineMode.CombineClosestEnabled) { break; for (int iIndex = 0, max = states.length; iIndex < max; iIndex++) { final TextureState pkTState = (TextureState) states[iIndex]; if (!pkTState.isEnabled()) { continue;
context.setCurrentState(StateType.Texture, state); if (state.isEnabled()) { Texture texture; Texture.Type type;
context.setCurrentState(StateType.Texture, state); if (state.isEnabled()) {
context.setCurrentState(StateType.Texture, state); if (state.isEnabled()) {