All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.jme3.terrain.collision.BaseAWTTest Maven / Gradle / Ivy

There is a newer version: 3.7.0-stable
Show newest version
package com.jme3.terrain.collision;

import com.jme3.asset.AssetManager;
import com.jme3.system.JmeSystem;

/**
 * This class provides some utility functions to properly test the jMonkeyEngine.
* It contains simple methods to get and create a headless assetManager amongst other things.
* In comparison to {@link BaseTest} it provides a DesktopAssetManager capable of loading image formats using AWT, which * however makes those tests unsuitable for headless ci testing. This requires jme3-desktop to be a testRuntime dependency. * * @author MeFisto94 */ public abstract class BaseAWTTest { private AssetManager assetManager; static { //JmeSystem.setSystemDelegate(new JmeDesktopSystem()); } public AssetManager getAssetManager() { if (assetManager == null) { assetManager = createAssetManager(); } return assetManager; } private AssetManager createAssetManager() { /* Desktop.cfg supports the following additional file formats at the time of writing: LOADER com.jme3.texture.plugins.AWTLoader : jpg, bmp, gif, png, jpeg LOADER com.jme3.audio.plugins.OGGLoader : ogg */ return JmeSystem.newAssetManager(BaseTest.class.getResource("/com/jme3/asset/Desktop.cfg")); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy