Not GWT compatible - shaders unable to load in GWT at runtime
Opened this issue · 1 comments
antzGames commented
As described in https://libgdx.com/wiki/file-handling
public class MsdfShader extends ShaderProgram {
public MsdfShader() {
super(Gdx.files.classpath("font.vert"), Gdx.files.classpath("font.frag"));
is not supported at runtime in GWT.
My GWT project compiles fine, but running in the browser it fails with above message.
Work around is to copy the shaders from this library into my assets folder.
SimonIT commented
Hmm, libgdx is also using classpath for their shader.
https://github.com/libgdx/libgdx/blob/ddc75209f30c3f6aa23d8888604663b09784320a/gdx/src/com/badlogic/gdx/graphics/g3d/shaders/DefaultShader.java#L395-L407
Maybe it works if we add something like this:
https://github.com/libgdx/libgdx/blob/ddc75209f30c3f6aa23d8888604663b09784320a/gdx/res/com/badlogic/gdx.gwt.xml#L527-L528