ruffle/core/build_playerglobal/flexpmd
Aaron Hill b8745f0ff1 avm2: Partially implement Stage3D for wgpu backend
This PR implements core 'stage3D' APIs. We are now able
to render at least two demos from the Context3D docs - a simple
triangle render, and a rotating cube.

Implemented in this PR:
* Stage3D access and Context3D creation
* IndexBuffer3D and VertexBuffer3D creation, uploading, and usage
* Program3D uploading and usage (via `naga-agal`)
* Context3D: configureBackBuffer, clear, drawTriangles, and present

Not yet implemented:
* Any 'dispose()' methods
* Depth and stencil buffers
* Context3D texture apis
* Scissor rectangle

General implementation strategy:

A new `Object` variant is added for each of the Stage3D objects
(VertexBuffer3D, Program3D, etc). This stores a handle to the
parent `Context3D`, and (depending on the object) a handle
to the underlying native resource, via `Rc<dyn
SomeRenderBackendTrait>`).

Calling methods on Context3D does not usually result in an immediate
call to a `wgpu` method. Instead, we queue up commands in our
`Context3D` instance, and execute them all on a call to `present`.
This avoids some nasty wgpu lifetime issues, and is very similar
to the approah we use for normal rendering.

The actual rendering happens on a `Texture`, with dimensions
determined by `createBackBuffer`. During 'Stage' rendering,
we render all of these Stage3D textures *behind* the normal
stage (but in front of the overall stage background color).
2022-11-25 21:43:00 -07:00
..
LICENSE.txt avm2: Add automatic linting for AS3 playerglobals 2022-09-04 16:33:35 -07:00
as3-parser-1.2.jar avm2: Add automatic linting for AS3 playerglobals 2022-09-04 16:33:35 -07:00
as3-parser-api-1.2.jar avm2: Add automatic linting for AS3 playerglobals 2022-09-04 16:33:35 -07:00
as3-plugin-utils-1.2.jar avm2: Add automatic linting for AS3 playerglobals 2022-09-04 16:33:35 -07:00
commons-lang-2.4.jar avm2: Add automatic linting for AS3 playerglobals 2022-09-04 16:33:35 -07:00
flex-pmd-command-line-1.2.jar avm2: Add automatic linting for AS3 playerglobals 2022-09-04 16:33:35 -07:00
flex-pmd-command-line-api-1.2.jar avm2: Add automatic linting for AS3 playerglobals 2022-09-04 16:33:35 -07:00
flex-pmd-core-1.2.jar avm2: Add automatic linting for AS3 playerglobals 2022-09-04 16:33:35 -07:00
flex-pmd-files-1.2.jar avm2: Add automatic linting for AS3 playerglobals 2022-09-04 16:33:35 -07:00
flex-pmd-ruleset-1.2.jar avm2: Add automatic linting for AS3 playerglobals 2022-09-04 16:33:35 -07:00
flex-pmd-ruleset-api-1.2.jar avm2: Add automatic linting for AS3 playerglobals 2022-09-04 16:33:35 -07:00
jsap-2.1.jar avm2: Add automatic linting for AS3 playerglobals 2022-09-04 16:33:35 -07:00
plexus-utils-1.0.2.jar avm2: Add automatic linting for AS3 playerglobals 2022-09-04 16:33:35 -07:00
pmd-4.2.5.jar avm2: Add automatic linting for AS3 playerglobals 2022-09-04 16:33:35 -07:00
ruffle-ruleset.xml avm2: Partially implement Stage3D for wgpu backend 2022-11-25 21:43:00 -07:00