-
Notifications
You must be signed in to change notification settings - Fork 25
GWT HTML Library Integration
Anton Chekulaev edited this page Aug 25, 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.
Add to your GWT module's build.gradle
:
dependencies {
implementation 'com.crashinvaders.vfx:gdx-vfx-core:0.4.0:sources'
implementation 'com.crashinvaders.vfx:gdx-vfx-gwt:0.4.0'
implementation 'com.crashinvaders.vfx:gdx-vfx-gwt:0.4.0:sources'
// If you use "gdx-vfx-effects" library, don't forget to add this line.
implementation 'com.crashinvaders.vfx:gdx-vfx-effects:0.4.0:sources'
}
Add these lines to your GdxDefinition.gwt.xml
file:
<module ...>
<!-- ... -->
<inherits name='com.crashinvaders.vfx.GdxVfxCore' />
<inherits name='com.crashinvaders.vfx.GdxVfxEffects' /> <!-- Optional, in case you use "gdx-vfx-effects" module -->
<inherits name='com.crashinvaders.vfx.GdxVfxGwt' />
</module>
Call GwtVfxGlExtension.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();
}
}
- Library Overview
- Connect the Library
- Use the Library
- VFX Frame Buffer
- Built-in Effects
- Changelog