You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 25, 2019. It is now read-only.
Hi,
The more I get to know FlasCC and GLS3D, the more I found that we can actually write GLS3D in C++. When implementing the shaders, I thought I can't create Stage3D objects in C++. However, it turns out that there's AS3++ header file, so that we can create Stage3D objects in C++.
So, the question becomes:
Do we actually need the action script code to translate from GL calls to Stage3D calls?
What is the initial design of GLS3D? Is it to provide GL layers to both AS code and C++ code? If yes, then it makes sense to have AS code. If not, we can probably write the library entirely in C++ (which can be more efficient). Is there any gotcha's when doing that?
Another advantage of doing everything in C++ is that we can include OpenGL library and thus we don't need to create GL constants for action script code.
Thanks.
-tep
The text was updated successfully, but these errors were encountered:
Initially it was done that way for convenience, but its almost certainly the right thing to move more towards c++. I would avoid the high level wrappers we shipped with flash++.h and instead just use the low level interop if possible as you'll have more control and won't run into any performance gotchas.
Also if you have a demo of any of the stuff you're working on I'd love to see it
I see. I'm curious now on how flash++ is implemented:
Is every call basically an inline_as3?
If I understand it correctly, all C++ code will be translated to action scripts call (through LLVM), so why Flash++ has more performance gotchas?
Is it possible to create an object in action script and pass the pointer to C/C++ code?
I'm actually just doing R&D for FlasCC technology and not sure if I can show it to you/in public (in addition, i'm just rendering boxes at the moment).
Yeah the flash++ code is all built on top of the basic interop, but the header is large and will slow down compile times a fair bit. It's probably overkill for this project.
The way flash++ gets references to as3 objects is a bit gross, essentially it keeps the as3 object and a ref count in a dictionary and the flash++ class stores the index, once the ref count hits zero the as3 object is removed from the dictionary and can be collected by the gc
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi,
The more I get to know FlasCC and GLS3D, the more I found that we can actually write GLS3D in C++. When implementing the shaders, I thought I can't create Stage3D objects in C++. However, it turns out that there's AS3++ header file, so that we can create Stage3D objects in C++.
So, the question becomes:
Another advantage of doing everything in C++ is that we can include OpenGL library and thus we don't need to create GL constants for action script code.
Thanks.
-tep
The text was updated successfully, but these errors were encountered: