-
-
Notifications
You must be signed in to change notification settings - Fork 416
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
buffer empty on sprite hitTest when using compressed texture #2646
Comments
Based on the current implementation, this appears to be the expected behavior. As far as I can tell,
var bitmapData = new BitmapData(texture.__width, texture.__height, true, 0);
bitmapData.readable = false;
bitmapData.__texture = texture;
bitmapData.__textureContext = texture.__textureContext;
bitmapData.image = null; Notice, in particular, that the Basically, in Flash, ATF textures weren't intended for use on the classic display list. They were meant for Stage 3D. OpenFL happens to render the classic display list using Stage 3D by default, which is pretty clever, but OpenFL has not provided a way to make ATF textures work on the classic display list as completely as PNG/JPG/etc. image formats can be. |
…y BitmapData where readable == false (references #2646) This avoids confusing exceptions being thrown, and it ensures that there's a match for endFill(). It will render pure black instead of a texture.
…eadable property (references #2646)
I added some details to the documentation for I also stopped the exception from being thrown when calling It also makes native targets more consistent with html5 because those previously failed silently without rendering anything. |
Thanks for your answer.
No. It renders actually. But crashes on mouse over. I don't know what the
No we can use it in I came across this bug during some tests I made. Drawing 464 sprites with Tilemap on html5 takes 275ms. With my polygon library that uses drawTriangles, it takes 178ms and with ATF it takes 45ms. So I'm afraid to lose something, especially because Stage3D looks less convienent and uses Agal instead of GLSL if I'm correct. For the record, with that, I'm also beating Unity3D rendering on native. |
I didn't see anything rendering on C++/Neko/HashLink when I tested the same
Fair enough. I often forget about the existence of Tilemap, since it wasn't a Flash API. Regardless, that's a similar use-case to |
Describe the bug
I have the following error when my mouse hits a sprite filled with
beginBitmapFill
using compressed texture (ATF).To Reproduce
Steps to reproduce the behavior:
Expected behavior
The buffer shouldn't be empty.
OpenFL Targets
all
Code Sample
The text was updated successfully, but these errors were encountered: