Search in sources :

Example 6 with NanoTimer

use of com.jme3.system.NanoTimer in project jmonkeyengine by jMonkeyEngine.

the class OGLESContext method initInThread.

protected void initInThread() {
    created.set(true);
    logger.fine("OGLESContext create");
    logger.log(Level.FINE, "Running on thread: {0}", Thread.currentThread().getName());
    // Setup unhandled Exception Handler
    Thread.currentThread().setUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {

        public void uncaughtException(Thread thread, Throwable thrown) {
            listener.handleError("Exception thrown in " + thread.toString(), thrown);
        }
    });
    timer = new NanoTimer();
    Object gl = new AndroidGL();
    // gl = GLTracer.createGlesTracer((GL)gl, (GLExt)gl);
    // gl = new GLDebugES((GL)gl, (GLExt)gl);
    renderer = new GLRenderer((GL) gl, (GLExt) gl, (GLFbo) gl);
    renderer.initialize();
    JmeSystem.setSoftTextDialogInput(this);
    needClose.set(false);
}
Also used : GLExt(com.jme3.renderer.opengl.GLExt) AndroidGL(com.jme3.renderer.android.AndroidGL) GLRenderer(com.jme3.renderer.opengl.GLRenderer) GLFbo(com.jme3.renderer.opengl.GLFbo) GL(com.jme3.renderer.opengl.GL) AndroidGL(com.jme3.renderer.android.AndroidGL)

Example 7 with NanoTimer

use of com.jme3.system.NanoTimer in project jmonkeyengine by jMonkeyEngine.

the class IGLESContext method create.

@Override
public void create(boolean waitFor) {
    logger.log(Level.FINE, "IGLESContext create");
    GL gl = new IosGL();
    GLExt glext = (GLExt) gl;
    //        if (settings.getBoolean("GraphicsDebug")) {
    gl = new GLDebugES(gl, glext, (GLFbo) glext);
    glext = (GLExt) gl;
    //        }
    renderer = new GLRenderer(gl, glext, (GLFbo) glext);
    renderer.initialize();
    input = new IosInputHandler();
    timer = new NanoTimer();
    //synchronized (createdLock){
    created.set(true);
    //createdLock.notifyAll();
    //}
    listener.initialize();
    if (waitFor) {
    //waitFor(true);
    }
    logger.log(Level.FINE, "IGLESContext created");
}
Also used : GLExt(com.jme3.renderer.opengl.GLExt) GLFbo(com.jme3.renderer.opengl.GLFbo) GLRenderer(com.jme3.renderer.opengl.GLRenderer) IosInputHandler(com.jme3.input.ios.IosInputHandler) GL(com.jme3.renderer.opengl.GL) IosGL(com.jme3.renderer.ios.IosGL) IosGL(com.jme3.renderer.ios.IosGL) GLDebugES(com.jme3.renderer.opengl.GLDebugES)

Example 8 with NanoTimer

use of com.jme3.system.NanoTimer in project jmonkeyengine by jMonkeyEngine.

the class JoglContext method internalCreate.

public void internalCreate() {
    timer = new NanoTimer();
    synchronized (createdLock) {
        created.set(true);
        createdLock.notifyAll();
    }
    if (renderable.get()) {
        initContextFirstTime();
    } else {
        assert getType() == Type.Canvas;
    }
}
Also used : NanoTimer(com.jme3.system.NanoTimer)

Aggregations

NanoTimer (com.jme3.system.NanoTimer)6 Vector3f (com.jme3.math.Vector3f)3 DirectionalLight (com.jme3.light.DirectionalLight)2 Material (com.jme3.material.Material)2 FilterPostProcessor (com.jme3.post.FilterPostProcessor)2 GL (com.jme3.renderer.opengl.GL)2 GLExt (com.jme3.renderer.opengl.GLExt)2 GLFbo (com.jme3.renderer.opengl.GLFbo)2 GLRenderer (com.jme3.renderer.opengl.GLRenderer)2 Box (com.jme3.scene.shape.Box)2 BoundingBox (com.jme3.bounding.BoundingBox)1 BulletAppState (com.jme3.bullet.BulletAppState)1 SphereCollisionShape (com.jme3.bullet.collision.shapes.SphereCollisionShape)1 KeyTrigger (com.jme3.input.controls.KeyTrigger)1 MouseButtonTrigger (com.jme3.input.controls.MouseButtonTrigger)1 IosInputHandler (com.jme3.input.ios.IosInputHandler)1 Quaternion (com.jme3.math.Quaternion)1 Vector2f (com.jme3.math.Vector2f)1 BloomFilter (com.jme3.post.filters.BloomFilter)1 AndroidGL (com.jme3.renderer.android.AndroidGL)1