Packageflare.system
Classpublic final class Device3D
InheritanceDevice3D Inheritance Object

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



Public Properties
 PropertyDefined By
  allowRuntimeTextureCompression : int = 0
[static]
Device3D
  camera : Camera3D
[static] Current rendering camera.
Device3D
  context : Context3D
[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
  drawCalls : int
[static] The number of draw operations of the last frame.
Device3D
  dynamicSamplerState : Boolean = false
[static]
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
  releaseBytes : Boolean = false
[static]
Device3D
  releaseTextureBitmaps : Boolean = false
[static] Allow for loaded texture bitmaps to be disposed after uploading those to the GPU to save memory usage.
Device3D
  scene : Scene3D
[static] Current scene.
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 Constants
 ConstantDefined By
  ambient : Vector.<Number>
[static]
Device3D
  bones : Vector.<Number>
[static] Buffer used to store bones transformations.
Device3D
  camDir : Vector.<Number>
[static]
Device3D
  cameraGlobal : Matrix3D
[static] Current view matrix.
Device3D
  camPos : Vector.<Number>
[static]
Device3D
  cos_time : Vector.<Number>
[static]
Device3D
  dirColor : Vector.<Number>
[static]
Device3D
  dirLight : Vector.<Number>
[static]
Device3D
  frac_time : 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
allowRuntimeTextureCompressionproperty
public static var allowRuntimeTextureCompression:int = 0

cameraproperty 
public static var camera:Camera3D

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

contextproperty 
public static var context:Context3D

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.

drawCallsproperty 
public static var drawCalls:int

The number of draw operations of the last frame.

dynamicSamplerStateproperty 
public static var dynamicSamplerState:Boolean = false

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.

releaseBytesproperty 
public static var releaseBytes:Boolean = false

releaseTextureBitmapsproperty 
public static var releaseTextureBitmaps:Boolean = false

Allow for loaded texture bitmaps to be disposed after uploading those to the GPU to save memory usage. All textures will use this setting as a default value. Although it is possible to specify this setting for each texture individually through releaseBitmap Texture3D property for special cases where the bitmap is required at runtime.

See also

sceneproperty 
public static var scene:Scene3D

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

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.

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

bonesConstant 
public static const bones:Vector.<Number>

Buffer used to store bones transformations.

camDirConstant 
public static const camDir:Vector.<Number>

cameraGlobalConstant 
public static const cameraGlobal:Matrix3D

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

camPosConstant 
public static const camPos:Vector.<Number>

cos_timeConstant 
public static const cos_time:Vector.<Number>

dirColorConstant 
public static const dirColor:Vector.<Number>

dirLightConstant 
public static const dirLight:Vector.<Number>

frac_timeConstant 
public static const frac_time: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.