Is it possible (without hacking around with opengl) to render an openfl.tilemap on a away3D Texture, straight from the API?
Sure, there is a SpriteSheetAnimator Class. But I just want to know if it is possible to render openfl stuff on an away3D texture instead of the default framebuffer.
Or maybe I have to play around with stage3D?
I wrote a SpriteRenderer with openGL which is very fast, I used that for BabylonHx. But maybe things are easier with away3D and I don’t want to hack the engine, if it is not necessary.
I just tried the BitmapFont Demo from away3d-samples.
And there an openfl TextField is added to an ObjectContainer3D. Wow, that’s cool. But does that mean I can have shading/lighting on that too, applying an away3D material?
It’s an away3d.text.textField … oh man …
We are using OpenGL in our core renderer, as well as in Stage3D, so the information is there, it’s just a matter of getting the two to link.
We have some initial work on making a
BitmapData object from a Stage3D texture, running only on OpenGL. Then
bitmapData.draw will render to a framebuffer. Perhaps this could fit with Away3D textures somehow. Something with
BitmapTexture, perhaps (but optimizations to use an existing framebuffer as the source texture)
Ok. I think I go with my own SpriteRenderer and it should not be too hard to combine it with away3d.
I just need access to the GLTexture to draw to that away3d texture applied to a plane, and then I have to restore the GL state (last bound texture, last program).Should not be that hard. Just wanted to know if there is already a function for that, because my code is surely not as good as your code or away3d code.
I tried the particles demo and tried 2 Million particles, and it goes with 60 FPS in the Browser!
My SpriteRenderer can draw only 100000, and that is only 2D …