I am currently working on a 3D engine in AS3, I developed it for the new Molehill API, but I also want to render to the current AS3 graphics API. I thought I would write a stack-based implementation to render to the target DisplayObject. Then I realized that I could essentially create an OpenGL API-style interface to abstract my 3D engine from real rasterization processes. (Like any 3D engine built on OpenGL) This will also allow other 3D engines to use the code, as in any other imported library. Obviously, there will be functionality that handles the viewing area, the matrix stack, etc., but a simple example could be:
AS3GL.begin( AS3GL.GL_TRIANGLES );
AS3GL.color3f(1,0,0);
AS3GL.vertex2f(0,0);
AS3GL.color3f(0,1,0);
AS3GL.vertex2f(.5,0);
AS3GL.color3f(0,0,1);
AS3GL.vertex2f(.5,.5);
AS3GL.end();
, - AS3, , - - / OpenGL.