Package com.jme3.view.surfaceview


package com.jme3.view.surfaceview
Holds JmeSurfaceView with some lifecycle interfaces.

This package provides the following :

JmeSurfaceView : An OpenGL android view wrapper for rendering, updating and destroying a jMonkeyEngine game. OnRendererStarted : Provides a method to be invoked when a jMonkeyEngine application starts. OnLayoutDrawn : Provides a method to be invoked when the GLSurfaceView draws the content, before OnRendererCompleted. OnRendererCompleted : Provides a method to be invoked on the first update of the game. OnExceptionThrown : Provides a method to be invoked when an exception is thrown.

  • Class
    Description
    A RelativeLayout class holder that wraps a GLSurfaceView as a renderer UI component and uses OGLESContext as a renderer context to render a jme game on an android view for custom xml designs. The main idea of JmeSurfaceView class is to start a jMonkeyEngine application in a SystemListener context on a GL_ES thread, then the game is rendered and updated through a GLSurfaceView component with a delay of user's choice using a Handler, during the delay, the user has the ability to handle a couple of actions asynchronously as displaying a progress bar on a SplashScreen or an image or even play a preface game music of choice.
    Determines whether the app context would be destructed with the holder activity context in case of JmeSurfaceView.DestructionPolicy.DESTROY_WHEN_FINISH or be spared for a second use in case of JmeSurfaceView.DestructionPolicy.KEEP_WHEN_FINISH.
    Used as a static memory to protect the game context from destruction by Activity#onDestroy().
    An interface designed to listen for exceptions and fire an event when an exception is thrown.
    An interface used for dispatching an event when the layout holding the GLSurfaceView is drawn, the event is dispatched on the user activity context thread.
    An interface used for invoking an event when the user delay finishes, on the first update of the game.
    An interface used for invoking an event when the application is started explicitly from JmeSurfaceView.startRenderer(int).