public void create(boolean waitFor) { if (actualContext != null){ throw new IllegalStateException("Already created"); } actualContext = JmeSystem.newContext(settings, Type.OffscreenSurface); actualContext.setSystemListener(new AwtPanelsListener()); actualContext.create(waitFor); }
/** * Starts the application. * Creating a rendering context and executing * the main loop in a separate thread. */ public void start(JmeContext.Type contextType, boolean waitFor){ if (context != null && context.isCreated()){ logger.warning("start() called when application already created!"); return; } if (settings == null){ settings = new AppSettings(true); } logger.log(Level.FINE, "Starting application: {0}", getClass().getName()); context = JmeSystem.newContext(settings, contextType); context.setSystemListener(this); context.create(waitFor); }
/** * Initializes the application's canvas for use. * <p> * After calling this method, cast the {@link #getContext() context} to * {@link JmeCanvasContext}, * then acquire the canvas with {@link JmeCanvasContext#getCanvas() } * and attach it to an AWT/Swing Frame. * The rendering thread will start when the canvas becomes visible on * screen, however if you wish to start the context immediately you * may call {@link #startCanvas() } to force the rendering thread * to start. * * @see JmeCanvasContext * @see Type#Canvas */ public void createCanvas(){ if (context != null && context.isCreated()){ logger.warning("createCanvas() called when application already created!"); return; } if (settings == null){ settings = new AppSettings(true); } logger.log(Level.FINE, "Starting application: {0}", getClass().getName()); context = JmeSystem.newContext(settings, JmeContext.Type.Canvas); context.setSystemListener(this); }
public void create(boolean waitFor) { if (actualContext != null) { throw new IllegalStateException("Already created"); } actualContext = JmeSystem.newContext(settings, Type.OffscreenSurface); actualContext.setSystemListener(new AwtPanelsListener()); actualContext.create(waitFor); }
public void create(boolean waitFor) { if (actualContext != null) { throw new IllegalStateException("Already created"); } actualContext = JmeSystem.newContext(settings, Type.OffscreenSurface); actualContext.setSystemListener(new AwtPanelsListener()); actualContext.create(waitFor); }
public void create(boolean waitFor) { if (actualContext != null){ throw new IllegalStateException("Already created"); } actualContext = JmeSystem.newContext(settings, Type.OffscreenSurface); actualContext.setSystemListener(new AwtPanelsListener()); actualContext.create(waitFor); }
/** * Starts the application. * Creating a rendering context and executing * the main loop in a separate thread. */ public void start(JmeContext.Type contextType){ if (context != null && context.isCreated()){ logger.warning("start() called when application already created!"); return; } if (settings == null){ settings = new AppSettings(true); } logger.log(Level.FINE, "Starting application: {0}", getClass().getName()); context = JmeSystem.newContext(settings, contextType); context.setSystemListener(this); context.create(false); }
/** * Starts the application. * Creating a rendering context and executing * the main loop in a separate thread. */ public void start(JmeContext.Type contextType, boolean waitFor){ if (context != null && context.isCreated()){ logger.warning("start() called when application already created!"); return; } if (settings == null){ settings = new AppSettings(true); } logger.log(Level.FINE, "Starting application: {0}", getClass().getName()); context = JmeSystem.newContext(settings, contextType); context.setSystemListener(this); context.create(waitFor); }
/** * Initializes the application's canvas for use. * <p> * After calling this method, cast the {@link #getContext() context} to * {@link JmeCanvasContext}, * then acquire the canvas with {@link JmeCanvasContext#getCanvas() } * and attach it to an AWT/Swing Frame. * The rendering thread will start when the canvas becomes visible on * screen, however if you wish to start the context immediately you * may call {@link #startCanvas() } to force the rendering thread * to start. * * @see JmeCanvasContext * @see Type#Canvas */ public void createCanvas(){ if (context != null && context.isCreated()){ logger.warning("createCanvas() called when application already created!"); return; } if (settings == null){ settings = new AppSettings(true); } logger.log(Level.FINE, "Starting application: {0}", getClass().getName()); context = JmeSystem.newContext(settings, JmeContext.Type.Canvas); context.setSystemListener(this); }
/** * Initializes the application's canvas for use. * <p> * After calling this method, cast the {@link #getContext() context} to * {@link JmeCanvasContext}, * then acquire the canvas with {@link JmeCanvasContext#getCanvas() } * and attach it to an AWT/Swing Frame. * The rendering thread will start when the canvas becomes visible on * screen, however if you wish to start the context immediately you * may call {@link #startCanvas() } to force the rendering thread * to start. * * @see JmeCanvasContext * @see Type#Canvas */ public void createCanvas(){ if (context != null && context.isCreated()){ logger.warning("createCanvas() called when application already created!"); return; } if (settings == null){ settings = new AppSettings(true); } logger.log(Level.FINE, "Starting application: {0}", getClass().getName()); context = JmeSystem.newContext(settings, JmeContext.Type.Canvas); context.setSystemListener(this); }