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

ScrollImage doesn't accout for "standard" Context3D profiles (simple fix) #8

Open
Mark-LaCroix opened this issue Aug 10, 2015 · 0 comments

Comments

@Mark-LaCroix
Copy link

I originally posted this as a late follow-up to an old issue on the Starling forum, here:
http://forum.starling-framework.org/topic/starling-15-extensions?replies=24#post-83544

I was having trouble with ScrollImage recently where it wasn't displaying my textures, which popped up after I updated some libraries (CitrusEngine, Starling, etc), so I thought some API got broken or something. Turns out, it seems that ScrollImage doesn't account for the three new-ish "standard" profiles now available in Stage3D.

So, when I changed line 597 from:

if ((target.profile == 'baselineExtended' || target.profile == 'baseline') && !useBase)
    options.push("clamp");
else
    options.push("repeat");

to:

if (target.profile != 'baselineConstrained' && !useBase)
    options.push("clamp");
else
    options.push("repeat");

...my issue resolved itself. In my app, I was using the default CitrusEngine Context3DProfile auto-selector, which picks the highest profile compatible with the device it's running on, and since all my testing devices were compatible with every Context3D profile (how things have changed), ScrollImage basically assumed it was always using "baselineContrained" and pushed the wrong string into the options array

Before changing that line, if I forced my app to either "baseline" or "baselineExtended," the problem went away. After changing it, I've since forced my app into all six of the available profiles available in the current version of AIR (18), and ScrollImage now works in all of them.

That said, I have no real clue what's happening here or why, or if my solution will work in everyone's app. I also don't know why this popped up as a problem for me recently since some of the newer profiles have been around since AIR 14.

Anyway I'd be interested to know if I'm on to something here, of if this is just a hacky workaround. Ether way, problems like these really make me appreciate the excellent work that goes into these helper libraries. I don't know where I'd be without them!

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

1 participant