1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
package flash.display3D;
@:final extern class Context3D extends flash.events.EventDispatcher {
@:require(flash15) var backBufferHeight(default,null) : Int;
@:require(flash15) var backBufferWidth(default,null) : Int;
var driverInfo(default,null) : String;
var enableErrorChecking : Bool;
@:require(flash15) var maxBackBufferHeight : Int;
@:require(flash15) var maxBackBufferWidth : Int;
@:require(flash12) var profile(default,null) : String;
function clear(red : Float = 0, green : Float = 0, blue : Float = 0, alpha : Float = 1, depth : Float = 1, stencil : UInt = 0, mask : UInt = 0xFFFFFFFF) : Void;
function configureBackBuffer(width : Int, height : Int, antiAlias : Int, enableDepthAndStencil : Bool = true, wantsBestResolution : Bool = false, wantsBestResolutionOnBrowserZoom : Bool = false) : Void;
function createCubeTexture(size : Int, format : Context3DTextureFormat, optimizeForRenderToTexture : Bool, streamingLevels : Int = 0) : flash.display3D.textures.CubeTexture;
function createIndexBuffer(numIndices : Int, ?bufferUsage : Context3DBufferUsage) : IndexBuffer3D;
function createProgram() : Program3D;
@:require(flash11_8) function createRectangleTexture(width : Int, height : Int, format : Context3DTextureFormat, optimizeForRenderToTexture : Bool) : flash.display3D.textures.RectangleTexture;
function createTexture(width : Int, height : Int, format : Context3DTextureFormat, optimizeForRenderToTexture : Bool, streamingLevels : Int = 0) : flash.display3D.textures.Texture;
function createVertexBuffer(numVertices : Int, data32PerVertex : Int, ?bufferUsage : Context3DBufferUsage) : VertexBuffer3D;
@:require(flash15) function createVideoTexture() : flash.display3D.textures.VideoTexture;
function dispose(recreate : Bool = true) : Void;
function drawToBitmapData(destination : flash.display.BitmapData) : Void;
function drawTriangles(indexBuffer : IndexBuffer3D, firstIndex : Int = 0, numTriangles : Int = -1) : Void;
function present() : Void;
function setBlendFactors(sourceFactor : Context3DBlendFactor, destinationFactor : Context3DBlendFactor) : Void;
function setColorMask(red : Bool, green : Bool, blue : Bool, alpha : Bool) : Void;
function setCulling(triangleFaceToCull : Context3DTriangleFace) : Void;
function setDepthTest(depthMask : Bool, passCompareMode : Context3DCompareMode) : Void;
@:require(flash16) function setFillMode( fillMode : Context3DFillMode ) : Void;
function setProgram(program : Program3D) : Void;
@:require(flash11_2) function setProgramConstantsFromByteArray(programType : Context3DProgramType, firstRegister : Int, numRegisters : Int, data : flash.utils.ByteArray, byteArrayOffset : UInt) : Void;
function setProgramConstantsFromMatrix(programType : Context3DProgramType, firstRegister : Int, matrix : flash.geom.Matrix3D, transposedMatrix : Bool = false) : Void;
function setProgramConstantsFromVector(programType : Context3DProgramType, firstRegister : Int, data : flash.Vector<Float>, numRegisters : Int = -1) : Void;
function setRenderToBackBuffer() : Void;
function setRenderToTexture(texture : flash.display3D.textures.TextureBase, enableDepthAndStencil : Bool = false, antiAlias : Int = 0, surfaceSelector : Int = 0, colorOutputIndex : Int = 0) : Void;
@:require(flash11_6) function setSamplerStateAt(sampler : Int, wrap : Context3DWrapMode, filter : Context3DTextureFilter, mipfilter : Context3DMipFilter) : Void;
function setScissorRectangle(rectangle : flash.geom.Rectangle) : Void;
function setStencilActions(?triangleFace : Context3DTriangleFace, ?compareMode : Context3DCompareMode, ?actionOnBothPass : Context3DStencilAction, ?actionOnDepthFail : Context3DStencilAction, ?actionOnDepthPassStencilFail : Context3DStencilAction) : Void;
function setStencilReferenceValue(referenceValue : UInt, readMask : UInt = 255, writeMask : UInt = 255) : Void;
function setTextureAt(sampler : Int, texture : flash.display3D.textures.TextureBase) : Void;
function setVertexBufferAt(index : Int, buffer : VertexBuffer3D, bufferOffset : Int = 0, ?format : Context3DVertexBufferFormat) : Void;
@:require(flash15) static var supportsVideoTexture(default,null) : Bool;
}
|