Skip to content

GWT HTML Library Integration

Anton Chekulaev edited this page Jun 18, 2020 · 12 revisions

The library uses an extended set of OpenGL functions that are not yet implemented for all of the official HTML/GWT LibGDX backends. To activate them for a GWT module, the specific method should be called before any library usage.

A. Add extra GWT dependencies

Add to your GWT module's build.gradle:

dependencies {
    implementation 'com.crashinvaders.vfx:gdx-vfx-core:0.5.0:sources'
    implementation 'com.crashinvaders.vfx:gdx-vfx-gwt:0.5.0'
    implementation 'com.crashinvaders.vfx:gdx-vfx-gwt:0.5.0:sources'

    // Optional, in case you use "gdx-vfx-effects" module.
    implementation 'com.crashinvaders.vfx:gdx-vfx-effects:0.5.0:sources'
}

B. Update your GWT configuration

Add these lines to your GdxDefinition.gwt.xml file:

<module ...>

    <!-- ... -->

    <inherits name='com.crashinvaders.vfx.GdxVfxCore' />
    <inherits name='com.crashinvaders.vfx.GdxVfxGwt' />

    <!-- Optional, in case you use "gdx-vfx-effects" module -->
    <inherits name='com.crashinvaders.vfx.GdxVfxEffects' />

</module>