class Stage3DProxy
package away3d.core.managers
extends EventDispatcher
Available on all platforms
Stage3DProxy provides a proxy class to manage a single Stage3D instance as well as handling the creation and attachment of the Context3D (and in turn the back buffer) is uses. Stage3DProxy should never be created directly, but requested through Stage3DManager.
See also:
away3d.core.managers.Stage3DProxy todo: consider moving all creation methods (createVertexBuffer etc) in here, so that disposal can occur here along with the context, instead of scattered throughout the framework
Static variables
Static methods
staticuploadIndexBufferFromVector(ib:IndexBuffer3D, data:Vector<UInt>, startOffset:Int, count:Int):Void
staticuploadVertexBufferFromVector(vb:VertexBuffer3D, data:Vector<Float>, startVertex:Int, numVertices:Int):Void
Constructor
new(stage3DIndex:Int, stage3D:Stage3D, stage3DManager:Stage3DManager, forceSoftware:Bool = false, profile:String = "baseline")
Creates a Stage3DProxy object. This method should not be called directly. Creation of Stage3DProxy objects should be handled by Stage3DManager.
Parameters:
stage3DIndex | The index of the Stage3D to be proxied. |
|---|---|
stage3D | The Stage3D to be proxied. |
stage3DManager | |
forceSoftware | Whether to force software mode even if hardware acceleration is available. |
Variables
Methods
addEventListener(type:String, listener:Dynamic ‑> Void, useCapture:Bool = false, priority:Int = 0, useWeakReference:Bool = false):Void
Registers an event listener object with an EventDispatcher object so that the listener receives notification of an event. Special case for enterframe and exitframe events - will switch Stage3DProxy into automatic render mode. You can register event listeners on all nodes in the display list for a specific type of event, phase, and priority.
Parameters:
type | The type of event. |
|---|---|
listener | The listener function that processes the event. |
useCapture | Determines whether the listener works in the capture phase or the target and bubbling phases. If useCapture is set to true, the listener processes the event only during the capture phase and not in the target or bubbling phase. If useCapture is false, the listener processes the event only during the target or bubbling phase. To listen for the event in all three phases, call addEventListener twice, once with useCapture set to true, then again with useCapture set to false. |
priority | The priority level of the event listener. The priority is designated by a signed 32-bit integer. The higher the number, the higher the priority. All listeners with priority n are processed before listeners of priority n-1. If two or more listeners share the same priority, they are processed in the order in which they were added. The default priority is 0. |
useWeakReference | Determines whether the reference to the listener is strong or weak. A strong reference (the default) prevents your listener from being garbage-collected. A weak reference does not. |
configureBackBuffer(backBufferWidth:Int, backBufferHeight:Int, antiAlias:Int, enableDepthAndStencil:Bool):Void
Configures the back buffer associated with the Stage3D object.
Parameters:
backBufferWidth | The width of the backbuffer. |
|---|---|
backBufferHeight | The height of the backbuffer. |
antiAlias | The amount of anti-aliasing to use. |
enableDepthAndStencil | Indicates whether the back buffer contains a depth and stencil buffer. |
removeEventListener(type:String, listener:Dynamic ‑> Void, useCapture:Bool = false):Void
Removes a listener from the EventDispatcher object. Special case for enterframe and exitframe events - will switch Stage3DProxy out of automatic render mode. If there is no matching listener registered with the EventDispatcher object, a call to this method has no effect.
Parameters:
type | The type of event. |
|---|---|
listener | The listener object to remove. |
useCapture | Specifies whether the listener was registered for the capture phase or the target and bubbling phases. If the listener was registered for both the capture phase and the target and bubbling phases, two calls to removeEventListener() are required to remove both, one call with useCapture() set to true, and another call with useCapture() set to false. |