Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing basic scene with Lime 3.7.4 and Haxe 3.4.0 #141

Open
maitag opened this issue Mar 3, 2017 · 2 comments
Open

Testing basic scene with Lime 3.7.4 and Haxe 3.4.0 #141

maitag opened this issue Mar 3, 2017 · 2 comments

Comments

@maitag
Copy link

maitag commented Mar 3, 2017

Ahoi,
on cpp (win7) basic scene sample works fine, but for html5 there is something new in Lime for webgl.
It did not found Gl with ...getContext("webgl", options) here:
-> https://github.com/vujadin/BabylonHx/blob/master/com/babylonhx/Engine.hx#L260
so changing it to "webgl2" it goes a little bit forward:

"Engine.hx:450: BabylonHx - Cross-Platform 3D Engine | 2017 | www.babylonhx.com | GL version: WebGL 2.0 | GL vendor: Mozilla | GL renderer: Mozilla"

but then more Errors in loading shader Assets:

[lime.utils.Assets] There is no TEXT asset with an ID of "assets/shaders/legacydefault.vertex.fx"
[lime.utils.Assets] There is no TEXT asset with an ID of "assets/shaders/legacydefault.fragment.fx"

so i tryed to copy the missing shaders from com.babylonhx/shader to assets/shader but then:

Effect.hx:361: Unable to compile effect: legacydefault
Effect.hx:362: Defines:
#define SPECULARTERM
#define NORMAL
#define LIGHT0
#define HEMILIGHT0
#define BonesPerMesh 0
#define NUM_BONE_INFLUENCERS 0
Effect.hx:364: Error: ERROR: 0:? : '' : syntax error

i get stuck again :(

@jgranick
Copy link

jgranick commented Mar 3, 2017

I did a pass using a development version of Lime 4:

https://github.com/jgranick/BabylonHx/tree/lime4

It works up to the same position, in Firefox it reports a more helpful error message:

String contains the illegal character '65279'

Perhaps this is an issue with the source fragment shaders? I've never seen this error with any Lime project before

EDIT: Update, this is caused by a byte-order mark in these files, removing fixed the error. Now nothing appears to happen, so there must be a logic issue next

@maitag
Copy link
Author

maitag commented Mar 4, 2017

ah, basic scene is working again (with lime 3.7.4)
-> changing text-format of legacydefault-shaders from utf-8 to ansi and it works !

Joshua, cool stuff with Lime 4 ... it looks more clean in handling gl-rendercontext.
( runs now on html5 + FF -> https://github.com/jgranick/BabylonHx/pulls :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants