/** * Starts the rendering thread after createCanvas() has been called. * <p> * Calling this method is optional, the canvas will start automatically * when it becomes visible. * * @param waitFor If true, the current thread will block until the * rendering thread is running */ public void startCanvas(boolean waitFor){ context.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, 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); }
context.create(waitFor);
/** * Starts the rendering thread after createCanvas() has been called. * <p> * Calling this method is optional, the canvas will start automatically * when it becomes visible. * * @param waitFor If true, the current thread will block until the * rendering thread is running */ public void startCanvas(boolean waitFor){ context.create(waitFor); }
/** * Starts the rendering thread after createCanvas() has been called. * <p> * Calling this method is optional, the canvas will start automatically * when it becomes visible. * * @param waitFor If true, the current thread will block until the * rendering thread is running */ public void startCanvas(boolean waitFor){ context.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); }
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); }