tconkling / flump

Exports Flash .FLAs to GPU-friendly formats
MIT License
381 stars 70 forks source link

Rectangle Texture exporter supported? #79

Open katopz opened 11 years ago

katopz commented 11 years ago

AIR 3.8 is released with Rectangle Texture support also Starling...

https://github.com/PrimaryFeather/Starling-Framework/commit/5b37e1843710650e56202c396d59952c0814fa0f

So anyone take a look for Rectangle Texture exporter supported yet?

roguenet commented 11 years ago

I believe flump has always exported rectangular textures when appropriate. In the past it meant a small runtime performance hit in Starling to copy that texture into a square bitmap. With 3.8 it's possible to avoid that hit now if you configure Starling appropriately.

If I remember correctly it just means using the BASELINE_EXTENDED constraint, but I'm not in front of a computer at the moment to double check.

On Friday, August 2, 2013, katopz wrote:

AIR 3.8 is released with Rectangle Texture support also Starling...

PrimaryFeather/Starling-Framework@5b37e18https://github.com/PrimaryFeather/Starling-Framework/commit/5b37e1843710650e56202c396d59952c0814fa0f

So anyone take a look for Rectangle Texture support yet?

— Reply to this email directly or view it on GitHubhttps://github.com/threerings/flump/issues/79 .

Nathan Curtis "Education is not the learning of facts, but the training of the mind to think." --Albert Einstein

roguenet commented 11 years ago

Oh and aside from the copy step, a rectangular texture will use less graphics memory than the square counterpart, so definitely worth using if you're set up for it!

On Friday, August 2, 2013, Nathan Curtis wrote:

I believe flump has always exported rectangular textures when appropriate. In the past it meant a small runtime performance hit in Starling to copy that texture into a square bitmap. With 3.8 it's possible to avoid that hit now if you configure Starling appropriately.

If I remember correctly it just means using the BASELINE_EXTENDED constraint, but I'm not in front of a computer at the moment to double check.

On Friday, August 2, 2013, katopz wrote:

AIR 3.8 is released with Rectangle Texture support also Starling...

PrimaryFeather/Starling-Framework@5b37e18https://github.com/PrimaryFeather/Starling-Framework/commit/5b37e1843710650e56202c396d59952c0814fa0f

So anyone take a look for Rectangle Texture support yet?

— Reply to this email directly or view it on GitHubhttps://github.com/threerings/flump/issues/79 .

Nathan Curtis "Education is not the learning of facts, but the training of the mind to think." --Albert Einstein

Nathan Curtis "Education is not the learning of facts, but the training of the mind to think." --Albert Einstein

aduros commented 11 years ago

"Rectangle Texture" support is actually about supporting non-power of two sized textures. Stage3D (and OpenGL) have always supported rectangular textures as long as each side is a power of two, with no copy step.

Flump might benefit slightly from nPOT textures I guess. I don't think BASELINE_EXTENDED works on mobile though.

roguenet commented 11 years ago

EXTENDED works on some mobile. Rob Zubek and I are both using it for 4k textures. He's on some droids, I'm on iPad.

On Friday, August 2, 2013, Bruno Garcia wrote:

"Rectangle Texture" support is actually about supporting non-power of two sized textures. Stage3D (and OpenGL) have always supported rectangular textures as long as each side is a power of two, with no copy step.

Flump might benefit slightly from nPOT textures I guess. I don't think BASELINE_EXTENDED works on mobile though.

— Reply to this email directly or view it on GitHubhttps://github.com/threerings/flump/issues/79#issuecomment-22026181 .

Nathan Curtis "Education is not the learning of facts, but the training of the mind to think." --Albert Einstein

aduros commented 11 years ago

Ah, cool :)

katopz commented 11 years ago

my target device (iPad and some poor Android) supported it, i get all up and running tho, so at present only flump exporter still export use power of 2 texture and i didn't see any option to enable "Rectangle Texture" anywhere, back to question...

How to enable it? or anyone implement it yet? if not i will take look.

Thanks

roguenet commented 11 years ago

As far as I know, nobody is currently looking into supporting non power of 2 textures. I'd be interested to hear if there is any worthwhile performance gain from doing so. Should be easy to test, by just taking some a generated flump zip, opening the textures in photoshop to trim them down, and re-zipping the archive.

Sidequest (still not in front of a computer yet): check Textures.fromBitmapData to see if a non-power of two texture with mipmapping enabled (not the flump default, but it is the Starling default) still creates a power of 2 square base texture. I'd bet it does, because I'd be surprised if GL is happy with a mipmaps on a non-square, non- power of 2 texture. Any GL experts know offhand?

On Fri, Aug 2, 2013 at 8:20 PM, katopz notifications@github.com wrote:

my target device (iPad and some poor Android) supported it, i get all up and running tho, so at present only flump exporter still export use power of 2 texture and i didn't see any option to enable "Rectangle Texture" anywhere, back to question...

How to enable it? or anyone implement it yet? if not i will take look.

Thanks

— Reply to this email directly or view it on GitHubhttps://github.com/threerings/flump/issues/79#issuecomment-22047606 .

Nathan Curtis "Education is not the learning of facts, but the training of the mind to think." --Albert Einstein