-
Notifications
You must be signed in to change notification settings - Fork 43
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
Rendering is broken for raw texture creation #98
Comments
Seems like an openfl issue, switched to lime asset loading and it just got fixed:
It would be cool if rawtexture would do the same with regular texture while loading bitmapdata so no need to hack around. |
Blue texture is openfl issue as every once in a while they change internal format of image. Its not RGB/RGBA by default anymore so you have to set it before using it: Regarding mipmaps, it is bhx problem and its inherited from original (bjs) code (mipmap flag is not passed properly). I'll fix this in next update (later today or tomorrow) |
That is helpful, thank you, I will use the PixelFormat for convenience. I understand the problem should stay in openfl side. Maybe there can be another static function in raw texture (CreateBGRA if order is different for e.g.) I guess we can keep this issue until mipmap implementation is recovered. |
This should be fixed now. You can use Tools.LoadImage() to get correct image data, it will always return image in RGBA format (creating mipmaps is also fixed): var bmp:Image = null; |
Mipmap flag is working now, thank you. |
Using openfl 2.6.1 and lime 2.9.1, osx/cpp target, with babylonhx-openfl setup,
Texture being used:
Code to generate material:
gives black texture,
if I disable mipmap, at least I get the texture but yellows seem blue:
I tried several different raw texture calls (rgb, rgba, alpa etc) all gives weird results. I don't use any openfl functionality (no addchild or draw). Regular Texture renders fine. But raw texture fails so...
The text was updated successfully, but these errors were encountered: