Skip to content

GWT HTML Library Integration

Anton Chekulaev edited this page Aug 18, 2019 · 12 revisions

The library uses extended set of OpenGL functions, that is not implemented for the official HTML/GWT LibGDX backend. In order to activate them for a GWT module, the specific method should be called prior any library usage.

A. Add extra GWT dependency

gdx-vfx-gwt.jar should be added as a dependency to the GWT module.

B. Activate GWT specific library code

Call GwtGLExtCalls.initialize(); prior any library usage. The code best to be placed in a GWT module launcher class (the one that extends GwtApplication).

For example:

public class GwtLauncher extends GwtApplication {

    @Override
    public ApplicationListener createApplicationListener() {
	// ...

        GwtVfxGlExtension.initialize();    // <-- Add this line.

        return new MyApplicationListener();
    }
}
Clone this wiki locally