Java Code Examples for com.jme3.system.AppSettings#setRenderer()

The following examples show how to use com.jme3.system.AppSettings#setRenderer() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TestMultipleApplications.java    From jmonkeyengine with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
/**
 * @param args the command line arguments
 */
public static void main(String[] args) {
    final AppSettings settings = new AppSettings(true);
    settings.setOpenCLSupport(true);
    settings.setVSync(true);
    settings.setOpenCLPlatformChooser(CustomPlatformChooser.class);
    settings.setRenderer(AppSettings.LWJGL_OPENGL2);
    for (int i=0; i<2; ++i) {
        new Thread() {
            @Override
            public void run() {
                if (currentDeviceIndex == -1) {
                    return;
                }
                TestMultipleApplications app = new TestMultipleApplications();
                app.setSettings(settings);
                app.setShowSettings(false);
                app.start();
            }
        }.start();
    }
}
 
Example 2
Source File: BaseExternalTest.java    From jmonkeybuilder with Apache License 2.0 5 votes vote down vote up
protected static @NotNull AppSettings getAppSettings() {
    final AppSettings settings = new AppSettings(true);
    settings.setHeight(768);
    settings.setWidth(1024);
    settings.setGammaCorrection(true);
    settings.setRenderer(AppSettings.LWJGL_OPENGL43);
    return settings;
}
 
Example 3
Source File: TestBetterCharacter.java    From jmonkeyengine with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
public static void main(String[] args) {
    TestBetterCharacter app = new TestBetterCharacter();
    AppSettings settings = new AppSettings(true);
    settings.setRenderer(AppSettings.LWJGL_OPENGL2);
    settings.setAudioRenderer(AppSettings.LWJGL_OPENAL);
    app.setSettings(settings);
    app.start();
}
 
Example 4
Source File: TestMultiPostWater.java    From jmonkeyengine with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
public static void main(String[] args) {
    TestMultiPostWater app = new TestMultiPostWater();
    AppSettings s = new AppSettings(true);
    s.setRenderer(AppSettings.LWJGL_OPENGL2);
    s.setAudioRenderer(AppSettings.LWJGL_OPENAL);
    app.setSettings(s);

    app.start();
}
 
Example 5
Source File: TestGeometryShader.java    From jmonkeyengine with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
public static void main(String[] args) {
    TestGeometryShader app = new TestGeometryShader();
    AppSettings settings = new AppSettings(true);
    settings.setRenderer(AppSettings.LWJGL_OPENGL33);
    app.setSettings(settings);
    app.start();
}
 
Example 6
Source File: TestTessellationShader.java    From jmonkeyengine with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
public static void main(String[] args) {
    TestTessellationShader app = new TestTessellationShader();
    AppSettings settings = new AppSettings(true);
    settings.setRenderer(AppSettings.LWJGL_OPENGL40);
    app.setSettings(settings);
    app.start();
}
 
Example 7
Source File: TestVertexBufferSharing.java    From jmonkeyengine with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
public static void main(String[] args){
    TestVertexBufferSharing app = new TestVertexBufferSharing();
    AppSettings settings = new AppSettings(true);
    settings.setOpenCLSupport(true);
    settings.setVSync(false);
    settings.setRenderer(AppSettings.LWJGL_OPENGL2);
    app.setSettings(settings);
    app.start(); // start the game
}
 
Example 8
Source File: TestContextSwitching.java    From jmonkeyengine with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
public TestContextSwitching() {
    AppSettings settings = new AppSettings(true);
    settings.setOpenCLSupport(true);
    settings.setVSync(true);
    settings.setWidth(800);
    settings.setHeight(600);
    settings.setOpenCLPlatformChooser(CustomPlatformChooser.class);
    settings.setRenderer(AppSettings.LWJGL_OPENGL2);
    
    setSettings(settings);
    setShowSettings(false);
}
 
Example 9
Source File: HelloOpenCL.java    From jmonkeyengine with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
public static void main(String[] args){
    HelloOpenCL app = new HelloOpenCL();
    AppSettings settings = new AppSettings(true);
    settings.setOpenCLSupport(true);
    settings.setVSync(true);
    settings.setRenderer(AppSettings.LWJGL_OPENGL2);
    app.setSettings(settings);
    app.start(); // start the game
}
 
Example 10
Source File: TestOpenCLLibraries.java    From jmonkeyengine with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
public static void main(String[] args){
    TestOpenCLLibraries app = new TestOpenCLLibraries();
    AppSettings settings = new AppSettings(true);
    settings.setOpenCLSupport(true);
    settings.setVSync(true);
    settings.setRenderer(AppSettings.LWJGL_OPENGL2);
    app.setSettings(settings);
    app.start(); // start the game
}
 
Example 11
Source File: TestWriteToTexture.java    From jmonkeyengine with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
public static void main(String[] args){
    TestWriteToTexture app = new TestWriteToTexture();
    AppSettings settings = new AppSettings(true);
    settings.setOpenCLSupport(true);
    settings.setVSync(false);
    settings.setRenderer(AppSettings.LWJGL_OPENGL2);
    app.setSettings(settings);
    app.start(); // start the game
}
 
Example 12
Source File: TestMusicPlayer.java    From jmonkeyengine with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
private void initAudioPlayer(){
    AppSettings settings = new AppSettings(true);
    settings.setRenderer(null); // disable rendering
    settings.setAudioRenderer("LWJGL");
    ar = JmeSystem.newAudioRenderer(settings);
    ar.initialize();
    ar.setListener(listener);
    AudioContext.setAudioRenderer(ar);
}
 
Example 13
Source File: TestMusicPlayer.java    From MikuMikuStudio with BSD 2-Clause "Simplified" License 5 votes vote down vote up
private void initAudioPlayer(){
    AppSettings settings = new AppSettings(true);
    settings.setRenderer(null); // disable rendering
    settings.setAudioRenderer("LWJGL");
    ar = JmeSystem.newAudioRenderer(settings);
    ar.initialize();
    ar.setListener(listener);
}
 
Example 14
Source File: AWTContext.java    From jmonkeyengine with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
/**
 * @return new settings.
 */
protected AppSettings createSettings() {
    final AppSettings settings = new AppSettings(true);
    settings.setRenderer(AppSettings.LWJGL_OPENGL32);
    return settings;
}
 
Example 15
Source File: TestIssue1340.java    From jmonkeyengine with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
private static AppSettings createSettings() {
    AppSettings settings = new AppSettings(true);
    settings.setRenderer(AppSettings.LWJGL_OPENGL32);
    return settings;
}