vujadin / BabylonHx

Port of Babylon.js 3D engine to Haxe.
http:/paradoxplay.com/babylonhx
Apache License 2.0
187 stars 43 forks source link

'precision' Errors when building from the latest GIT repo #69

Open guyvert1 opened 9 years ago

guyvert1 commented 9 years ago

Hiya,

Been having a lot of fun with your port (Very good work!!) , but since last night I get the following when building code that used to work fine. I noticed you've done a lot of updates so perhaps something a miss there?

For info, I get the same errors building for mac or web (via git repo of snow).. My app builds/starts with errors below, screen goes grey, nothing working...

Anyway, keep up the good work, I'm a big fan ...


Effect.hx:222: ERROR: 0:11: 'precision' : syntax error: syntax error

Effect.hx:222: ERROR: 0:11: 'precision' : syntax error: syntax error

Effect.hx:239: Unable to compile effect: default Effect.hx:240: Defines: #define DIFFUSE

define NORMAL

define UV1

define SHADOWS

define LIGHT0

Effect.hx:241: Error: ERROR: 0:11: 'precision' : syntax error: syntax error

Effect.hx:222: ERROR: 0:9: 'precision' : syntax error: syntax error

Effect.hx:222: ERROR: 0:9: 'precision' : syntax error: syntax error

Effect.hx:239: Unable to compile effect: default Effect.hx:240: Defines: #define DIFFUSE

define NORMAL

define UV1

define LIGHT0

Effect.hx:241: Error: ERROR: 0:9: 'precision' : syntax error: syntax error

vujadin commented 9 years ago

Hi, yes, it was a big update. How can I reproduce your error ?

guyvert1 commented 9 years ago

Apologies, not had time to pull out code, although when I did try your example demos (pulled latest release from git), they wouldn't compile, so not sure if they've been updated. I'm wondering if any of the API have changed ?

bash-3.2$ haxelib run flow run web flow / 1.0.0-alpha.1 (node.js v0.12.7) flow / target is web flow / haxe version 3.2.1

flow / build - BabylonHx 1.0.0 for web flow / build - running haxe ... src/samples/Fog.hx:20: characters 52-57 : Int should be Null src/samples/Fog.hx:20: characters 52-57 : Int should be com.babylonhx.Scene src/samples/Fog.hx:20: characters 52-57 : For optional function argument 'scene' src/samples/Fog.hx:21: characters 52-57 : Int should be Null src/samples/Fog.hx:21: characters 52-57 : Int should be com.babylonhx.Scene src/samples/Fog.hx:21: characters 52-57 : For optional function argument 'scene' src/samples/Fog.hx:22: characters 52-57 : Int should be Null src/samples/Fog.hx:22: characters 52-57 : Int should be com.babylonhx.Scene src/samples/Fog.hx:22: characters 52-57 : For optional function argument 'scene' bash-3.2$ openfl test mac src/samples/CSGDemo.hx:74: characters 41-46 : Int should be Null src/samples/CSGDemo.hx:74: characters 41-46 : Int should be com.babylonhx.Scene src/samples/CSGDemo.hx:74: characters 41-46 : For optional function argument 'scene'

vujadin commented 9 years ago

Should be fixed with acc7699 And yes, common mesh creation API has changed, samples will be updated soon.

guyvert1 commented 9 years ago

Thanks for the time with the update, unfortunately the BasicScene does not compile, which looks like part of the update. : I tried changing around params to no avail, so took out the cylinder to get it to compile, but alas grey screen with 'precision' errors:

low / launching BabylonHx 1.0.0 for mac

Engine.hx:168: BabylonHx - Cross-Platform 3D Engine | 2015 | www.babylonhx.com Effect.hx:222: ERROR: 0:9: 'precision' : syntax error: syntax error

Effect.hx:222: ERROR: 0:9: 'precision' : syntax error: syntax error

Effect.hx:240: Unable to compile effect: default Effect.hx:241: Defines:

define HEMILIGHT0

define NORMAL

define LIGHT0

define BonesPerMesh 0

define NUM_BONE_INFLUENCERS 0

Effect.hx:242: Error: ERROR: 0:9: 'precision' : syntax error: syntax error

Effect.hx:222: ERROR: 0:2: 'precision' : syntax error: syntax error

Effect.hx:240: Unable to compile effect: color Effect.hx:241: Defines: Effect.hx:242: Error: ERROR: 0:2: 'precision' : syntax error: syntax error

This was compiling on OSX/iMac, however 'web' worked just fine !!

I understand your time is valuable and look forward to an update :-)

vujadin commented 8 years ago

BasicScene, BasicElements samples compile fine on Win (tested on two machines), Android and Web. It should be fixed now.