com.jme3.scene.plugins.ogre.matext.package.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jme3-plugins Show documentation
Show all versions of jme3-plugins Show documentation
jMonkeyEngine is a 3-D game engine for adventurous Java developers
com.jme3.scene.plugins.ogre.matext
allows loading of more advanced
Ogre3D materials that use "base" materials to abstract functionality.
E.g. example of an Ogre3D material instance:
import * from "materials/baselighting.material"
material MyMaterial : BaseLightingMaterial
{
set_texture_alias MyTexture textures/mytex.png
}
Usage
Example code of loading the above material:
MaterialExtensionSet matExts = new MaterialExtensionSet();
MaterialExtension baseLightExt = new MaterialExtension("BaseLightingMaterial",
"Common/MatDefs/Light/Lighting.j3md");
baseLightExt.setTextureMapping("MyTexture", "m_DiffuseMap");
matExts.addMaterialExtension(baseLightExt);
OgreMaterialKey matKey = new OgreMaterialKey("materials/mymaterial.material");
matKey.setMaterialExtensionSet(matExts);
MaterialList ogreMats = assetManager.loadAsset(matKey);
© 2015 - 2024 Weber Informatics LLC | Privacy Policy