Packageflare.system
Classpublic final class Device3D
InheritanceDevice3D Inheritance Object

The Device3D class manages the main configuration, states and data processing.



Public Properties
 PropertyDefined By
  camera : Camera3D
[static] Current rendering camera.
Device3D
  context : Context3D
[static]
Device3D
  cullFace : String
[static]
Device3D
  defaultCullFace : String = back
[static] The default cull face mode to use when some material is created.
Device3D
  defaultDestFactor : String = zero
[static] The default destination factor to use when some material is created.
Device3D
  defaultSourceFactor : String = one
[static] The default source factor to use when some material is created.
Device3D
  depthCompare : String
[static]
Device3D
  depthWrite : Boolean
[static]
Device3D
  destFactor : String
[static]
Device3D
  drawCalls : int
[static] The number of draw operations of the last frame.
Device3D
  forceTextureInitialization : Boolean = true
[static] Forces a first clear when a new dynamic texture is created.
Device3D
  frameCount : int
[static] The ammount of frames rendered.
Device3D
  ignoreStates : Boolean = false
[static] This property sets if materials should use define render states.
Device3D
  invertCullFace : Boolean = false
[static] Allow to invert the culling state.
Device3D
  lastMaterial : Material3D
[static] Sets or gets the last used material.
Device3D
  maxBonesPerSurface : int = 34
[static] The maximim number of bones per surface.
Device3D
  maxBonesPerVertex : int
[static] Sets and returns the maximum number of bones per vertex (1 to 4).
Device3D
  maxTextureSize : int = 2048
[static] The maximum texture size allowed.
Device3D
  nullBitmapData : BitmapData
[static]
Device3D
  objectsDrawn : int
[static] The number of objects that was drawn on the last frame.
Device3D
  profile : String = baseline
[static] Defines which profile will be used when the context is created.
Device3D
  program : Program3D
[static]
Device3D
  samplers : Vector.<TextureBase>
[static]
Device3D
  scene : Scene3D
[static] Current scene.
Device3D
  sourceFactor : String
[static]
Device3D
  trianglesDrawn : int
[static] The number of triangles drawn on the last frame.
Device3D
  usedBuffers : int
[static] Sets or gets the amount of used buffers in last draw call.
Device3D
  usedSamples : int
[static] Sets or gets the amount of used samples in last draw call.
Device3D
  viewPort : Rectangle
[static] Current viewport rectangle.
Device3D
Public Methods
 MethodDefined By
  
setBlendFactors(source:String, destination:String):void
[static]
Device3D
  
setCulling(triangleFace:String):void
[static]
Device3D
  
setDepthTest(depthMask:Boolean, passCompareMode:String):void
[static]
Device3D
  
setProgram(p:Program3D):void
[static]
Device3D
  
setTextureAt(i:int, texture:TextureBase):void
[static]
Device3D
Public Constants
 ConstantDefined By
  ambient : Vector.<Number>
[static]
Device3D
  bones : Vector.<Number>
[static] Buffer used to store bones transformations.
Device3D
  cam : Vector.<Number>
[static]
Device3D
  cameraGlobal : Matrix3D
[static] Current view matrix.
Device3D
  cos_time : Vector.<Number>
[static]
Device3D
  dirColor : Vector.<Number>
[static]
Device3D
  dirLight : Vector.<Number>
[static]
Device3D
  global : Matrix3D
[static] Global matrix of current rendering object.
Device3D
  invGlobal : Matrix3D
[static] Inverse global matrix of current rendering object.
Device3D
  mouse : Vector.<Number>
[static]
Device3D
  nearFar : Vector.<Number>
[static]
Device3D
  pointColor : Vector.<Number>
[static]
Device3D
  pointLight : Vector.<Number>
[static]
Device3D
  proj : Matrix3D
[static] Current projection matrix.
Device3D
  random : Vector.<Number>
[static]
Device3D
  screen : Vector.<Number>
[static]
Device3D
  sin_time : Vector.<Number>
[static]
Device3D
  special0 : Matrix3D
[static]
Device3D
  special1 : Matrix3D
[static]
Device3D
  special2 : Matrix3D
[static]
Device3D
  temporal0 : Matrix3D
[static]
Device3D
  temporal1 : Matrix3D
[static]
Device3D
  time : Vector.<Number>
[static]
Device3D
  view : Matrix3D
[static] Current inverted view matrix.
Device3D
  viewProj : Matrix3D
[static] Current view-projection matrix.
Device3D
  worldView : Matrix3D
[static] Current world-view matrix.
Device3D
  worldViewProj : Matrix3D
[static] Current world-view-projection matrix.
Device3D
Property Detail
cameraproperty
public static var camera:Camera3D

Current rendering camera. This property is automatically set during the rendereing process.

contextproperty 
public static var context:Context3D

cullFaceproperty 
public static var cullFace:String

defaultCullFaceproperty 
public static var defaultCullFace:String = back

The default cull face mode to use when some material is created.

defaultDestFactorproperty 
public static var defaultDestFactor:String = zero

The default destination factor to use when some material is created.

defaultSourceFactorproperty 
public static var defaultSourceFactor:String = one

The default source factor to use when some material is created.

depthCompareproperty 
public static var depthCompare:String

depthWriteproperty 
public static var depthWrite:Boolean

destFactorproperty 
public static var destFactor:String

drawCallsproperty 
public static var drawCalls:int

The number of draw operations of the last frame.

forceTextureInitializationproperty 
public static var forceTextureInitialization:Boolean = true

Forces a first clear when a new dynamic texture is created. This prevents to read an unused or unwritten texture.

frameCountproperty 
public static var frameCount:int

The ammount of frames rendered.

ignoreStatesproperty 
public static var ignoreStates:Boolean = false

This property sets if materials should use define render states. If it is sets to false, all blending states, culling, depth testing, masks and scissors are ignored and is to the user to set the state manually. This may be used in cases where an user defined pass needs to be drawn and an specific state is required. All textures, constants parameters and surface buffers will still be defined by the engine.

invertCullFaceproperty 
public static var invertCullFace:Boolean = false

Allow to invert the culling state. This property may be used when drawing mirros for example.

lastMaterialproperty 
public static var lastMaterial:Material3D

Sets or gets the last used material. This value is used by the engine to clear only the necesary states.

maxBonesPerSurfaceproperty 
public static var maxBonesPerSurface:int = 34

The maximim number of bones per surface. This value should not be changed if it is not really necesary, it could affect dramatically the performance and stability of the engine.

maxBonesPerVertexproperty 
maxBonesPerVertex:int

Sets and returns the maximum number of bones per vertex (1 to 4). This property works as a global configuration, and should be defined before creating the scene.


Implementation
    public static function get maxBonesPerVertex():int
    public static function set maxBonesPerVertex(value:int):void
maxTextureSizeproperty 
public static var maxTextureSize:int = 2048

The maximum texture size allowed.

nullBitmapDataproperty 
public static var nullBitmapData:BitmapData

objectsDrawnproperty 
public static var objectsDrawn:int

The number of objects that was drawn on the last frame.

profileproperty 
public static var profile:String = baseline

Defines which profile will be used when the context is created. This property should be set before the scene context is created.

programproperty 
public static var program:Program3D

samplersproperty 
public static var samplers:Vector.<TextureBase>

sceneproperty 
public static var scene:Scene3D

Current scene. This property is automatically set during the rendereing process.

sourceFactorproperty 
public static var sourceFactor:String

trianglesDrawnproperty 
public static var trianglesDrawn:int

The number of triangles drawn on the last frame.

usedBuffersproperty 
public static var usedBuffers:int

Sets or gets the amount of used buffers in last draw call. This value is used by the engine to clear only the necesary states.

usedSamplesproperty 
public static var usedSamples:int

Sets or gets the amount of used samples in last draw call. This value is used by the engine to clear only the necesary states.

viewPortproperty 
public static var viewPort:Rectangle

Current viewport rectangle. This property is automatically set during the rendereing process.

Method Detail
setBlendFactors()method
public static function setBlendFactors(source:String, destination:String):void

Parameters

source:String
 
destination:String

setCulling()method 
public static function setCulling(triangleFace:String):void

Parameters

triangleFace:String

setDepthTest()method 
public static function setDepthTest(depthMask:Boolean, passCompareMode:String):void

Parameters

depthMask:Boolean
 
passCompareMode:String

setProgram()method 
public static function setProgram(p:Program3D):void

Parameters

p:Program3D

setTextureAt()method 
public static function setTextureAt(i:int, texture:TextureBase):void

Parameters

i:int
 
texture:TextureBase

Constant Detail
ambientConstant
public static const ambient:Vector.<Number>

bonesConstant 
public static const bones:Vector.<Number>

Buffer used to store bones transformations.

camConstant 
public static const cam:Vector.<Number>

cameraGlobalConstant 
public static const cameraGlobal:Matrix3D

Current view matrix. This property is automatically set during the rendereing process.

cos_timeConstant 
public static const cos_time:Vector.<Number>

dirColorConstant 
public static const dirColor:Vector.<Number>

dirLightConstant 
public static const dirLight:Vector.<Number>

globalConstant 
public static const global:Matrix3D

Global matrix of current rendering object. This property is automatically set during the rendereing process.

invGlobalConstant 
public static const invGlobal:Matrix3D

Inverse global matrix of current rendering object. This property is automatically set during the rendereing process.

mouseConstant 
public static const mouse:Vector.<Number>

nearFarConstant 
public static const nearFar:Vector.<Number>

pointColorConstant 
public static const pointColor:Vector.<Number>

pointLightConstant 
public static const pointLight:Vector.<Number>

projConstant 
public static const proj:Matrix3D

Current projection matrix. This property is automatically set during the rendereing process.

randomConstant 
public static const random:Vector.<Number>

screenConstant 
public static const screen:Vector.<Number>

sin_timeConstant 
public static const sin_time:Vector.<Number>

special0Constant 
public static const special0:Matrix3D

special1Constant 
public static const special1:Matrix3D

special2Constant 
public static const special2:Matrix3D

temporal0Constant 
public static const temporal0:Matrix3D

temporal1Constant 
public static const temporal1:Matrix3D

timeConstant 
public static const time:Vector.<Number>

viewConstant 
public static const view:Matrix3D

Current inverted view matrix. This property is automatically set during the rendereing process.

viewProjConstant 
public static const viewProj:Matrix3D

Current view-projection matrix. This property is automatically set during the rendereing process.

worldViewConstant 
public static const worldView:Matrix3D

Current world-view matrix. This property is automatically set during the rendereing process.

worldViewProjConstant 
public static const worldViewProj:Matrix3D

Current world-view-projection matrix. This property is automatically set during the rendereing process.