Questions about hxsl tutorials

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Questions about hxsl tutorials

Fei Yin
Since haXe update to 2.08 , and Flashplayer 11 release today , I try to learn to use hxsl to write 3D . with tutorial at http://haxe.org/doc/advanced/flash3d

My haXe version is 2.08, and flashplayer version is 11.0.1.152.

But there is a big problem is the sample code was unusable . I download molehill.zip file and unzip it when I try to run the swf file , it throw a error said

ReferenceError: Error #1056: Can not create property viewPort for flash.display.Stage3D class.
    at Test()
    at Test$/main()
    at boot_8687/init()
    at flash::Boot/start()
    at boot_8687()

And there is nothing on stage when continue. NOTICE: ALL sample codes have this error.

Then I try to compile the 0_cube sample . I got these compiler error:
$ haxe test.hxml
/home/icebird/haxelib/format/1,19,4/format/hxsl/Parser.hx:240: characters 7-11 : This constructor requires 2 arguments
/home/icebird/haxelib/format/1,19,4/format/hxsl/Parser.hx:385: characters 7-11 : This constructor requires 2 arguments
/home/icebird/haxelib/format/1,19,4/format/hxsl/Shader.hx:29: characters 2-11 : Build failure
Test.hx:37: characters 2-12 : flash.display.Stage3D has no field viewPort
Test.hx:52: characters 18-34 : flash.display.Stage3D has no field viewPort
Test.hx:53: characters 18-35 : flash.display.Stage3D has no field viewPort
Test.hx:91: characters 2-13 : Shader has no field init

The question is : Am I make some mistake with hxsl ? or the tutorial is out of date? Where is the right tutorials for hxsl and flash 3D now?
--
Yin Fei
From Icebirds.net


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Questions about hxsl tutorials

Dinko Pavicic
Code was written with Molehill Alpha which had Viewport. Since then API has changed a little and viewport doesn't exist anymore.
Simply remove any references to the 'viewport' and it should work.

Also did you installed 'format' library from haxelib? Seems those hxsl parser error are related to missing 'format' lib.
Just type in cmd: haxelib install format

Hope this helps,
D.
Reply | Threaded
Open this post in threaded view
|

Re: Questions about hxsl tutorials

Nicolas Cannasse
In reply to this post by Fei Yin
Le 05/10/2011 14:19, Fei Yin a écrit :
> Since haXe update to 2.08 , and Flashplayer 11 release today , I try to
> learn to use hxsl to write 3D . with tutorial at
> http://haxe.org/doc/advanced/flash3d
>
> My haXe version is 2.08, and flashplayer version is 11.0.1.152.

Hi,

Thanks for reporting.
I've been updating the "molehill.zip" tutorials.

You'll also need to run "haxelib install format" to upgrade to hxformat
1.19.5 which contains fixes for HxSL under 2.08

Best,
Nicolas

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Questions about hxsl tutorials

Fei Yin
In reply to this post by Dinko Pavicic
I just tried remove all codes with viewPort , but it still can't compile . format lib is 1.19.4 version.

$ haxe test.hxml
/home/icebird/haxelib/format/1,19,4/format/hxsl/Parser.hx:240: characters 7-11 : This constructor requires 2 arguments
/home/icebird/haxelib/format/1,19,4/format/hxsl/Parser.hx:385: characters 7-11 : This constructor requires 2 arguments
/home/icebird/haxelib/format/1,19,4/format/hxsl/Shader.hx:29: characters 2-11 : Build failure
Test.hx:87: characters 2-13 : Shader has no field init



On Wed, Oct 5, 2011 at 9:35 PM, Dinko Pavicic <[hidden email]> wrote:
Code was written with Molehill Alpha which had Viewport. Since then API has
changed a little and viewport doesn't exist anymore.
Simply remove any references to the 'viewport' and it should work.

Also did you installed 'format' library from haxelib? Seems those hxsl
parser error are related to missing 'format' lib.
Just type in cmd: haxelib install format

Hope this helps,
D.

--
View this message in context: http://haxe.1354130.n2.nabble.com/Questions-about-hxsl-tutorials-tp6861893p6862143.html
Sent from the Haxe mailing list archive at Nabble.com.

--
haXe - an open source web programming language
http://haxe.org



--
Yin Fei
From Icebirds.net


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Questions about hxsl tutorials

Fei Yin
In reply to this post by Nicolas Cannasse
Thank you Nicolas ! It works now .

On Wed, Oct 5, 2011 at 9:55 PM, Nicolas Cannasse <[hidden email]> wrote:
Le 05/10/2011 14:19, Fei Yin a écrit :

Since haXe update to 2.08 , and Flashplayer 11 release today , I try to
learn to use hxsl to write 3D . with tutorial at
http://haxe.org/doc/advanced/flash3d

My haXe version is 2.08, and flashplayer version is 11.0.1.152.

Hi,

Thanks for reporting.
I've been updating the "molehill.zip" tutorials.

You'll also need to run "haxelib install format" to upgrade to hxformat 1.19.5 which contains fixes for HxSL under 2.08

Best,
Nicolas


--
haXe - an open source web programming language
http://haxe.org



--
Yin Fei
>From Icebirds.net


--
haXe - an open source web programming language
http://haxe.org