Test to Android - OpenFL - Away3D build

Hi all,

Previously was able to deploy a game using the away3D framework for OpenFL.

I hadn’t deployed to android for a few weeks - and attempting now - getting the following error thrown in the console output, and the app immediately closes. I don’t see any screen/loading at all.

I/trace (11794): AGLSLShaderUtils.hx:85: — ERR —
I/trace (11794): uniform vec4 fc1;
I/trace (11794): vec4 ft0;
I/trace (11794): varying vec4 vi0;
I/trace (11794): uniform sampler2D fs0;
I/trace (11794): void main() {
I/trace (11794): ft0 = vec4(fc1);
I/trace (11794): ft0 = vec4(texture2D(fs0,vec2(vi0)).xyzw);
I/trace (11794): gl_FragColor = vec4(ft0);
I/trace (11794): }

This file is in the OpenFL files, under Display3D. Doesn’t say what is wrong with it or the error encountered.

This code builds fine for android/flash, but only can run the Flash version. This is the error when attempting to load on Android.

actuate: 1.8.0 1.8.1 1.8.2 [1.8.4]
away3d: [1.1.0]
box2d: [1.2.3]
cocktail: [1.0.0-beta.5]
extension-iap: [dev:D:\Dropbox\OpenFL\extension-iap]
haxelib_client: [3.2.0-rc.3]
hxcpp: 3.1.48 3.1.68 [3.2.81]
layout: 1.1.0 [1.2.0]
lime-samples: [2.3.0]
lime: 2.0.4 2.0.6 2.1.3 2.3.2 [2.3.3]
msignal: [1.2.2]
nape: [2.0.16]
openfl-samples: [2.2.2]
openfl: [3.0.3]
stage3d-glsl: [0.1.0]
swf: 1.7.3 1.7.6 1.7.7 1.8.5 [1.8.6]
tilelayer: [0.2.0]

Any ideas whats wrong? is there a bug in OpenFL or have I somehow screwed up something?

I thought if the openfl classes were damaged/corrupted, it wouldn’t be able to execute Flash either.


Not really, because flash dosen’t use AGLSLShaderUtils.hx, it just use the AGAL shader. By looking at the source the error is thrown because (GL.getShaderParameter (shader, GL.COMPILE_STATUS) == 0), that means that the GLSL generated could not be compiled. The shader posted looks like a pixel shader, don’t know if the syntax is write because I don’t really know GLSL.

if it did cause a problem, surely it wouldve broken the build? it built successfully. it was only at runtime it threw the error. :-/

AGAL is a shader language for AS3/Flash, @Greg209 made an AGAL to GLSL exporter, that changes all the away3d shader so that they are compatible with OpenGL(Android) that use GLSL as a shader language. The shader is compiled at runtime, so there is now way you are going to get any error during the build.

How many week? did you use the latest openfl last time 3.0.3? you don’t have any previous version install. Are you working in your own project or are you trying to compile an Away3d example?

Might have been an earlier version of openFL (2.4.2 I think), as this was a dependency for away3d. But had upgraded to 3.0.3 and looks like that is the cause. Although looked at the class in both versions and they appear to be identical. Perhaps something else has changed and broken?

Maybe you can try github version, some changes were merged into openFL. Did you try legacy? add <set name="openfl-legacy" /> before you add your openfl lib.

Where abouts in the project XML do I put that?

before <haxelib name="openfl" />

fixed the problem… so openfl has broken in the new version?

Away3Dhaxe is under development and openFL is changing to a new architecture, so you can expect this kind of inconvenients in the transition