Packagealternativa.engine3d.resources
Classpublic class BitmapTextureResource
InheritanceBitmapTextureResource Inheritance TextureResource Inheritance Resource Inheritance Object

Texture resource, that allows user to upload textures from BitmapData to GPU. Size of texture must be power of two (e.g., 256х256, 12812, 25632).

See also

alternativa.engine3d.resources.TextureResource
alternativa.engine3d.resources.ATFTextureResource
alternativa.engine3d.resources.ExternalTextureResource


Public Properties
 PropertyDefined By
  data : BitmapData
BitmapData
BitmapTextureResource
 InheritedisUploaded : Boolean
[override] [read-only] Defines if this resource is uploaded inti a Context3D.
TextureResource
  resizeForGPU : Boolean = false
BitmapTextureResource
Public Methods
 MethodDefined By
  
BitmapTextureResource(data:BitmapData, resizeForGPU:Boolean = false)
Uploads textures from BitmapData to GPU.
BitmapTextureResource
 Inherited
dispose():void
[override] Removes this resource from Context3D to which it was uploaded.
TextureResource
  
upload(context3D:Context3D):void
[override] Uploads resource into given Context3D.
BitmapTextureResource
Property Detail
dataproperty
public var data:BitmapData

BitmapData

resizeForGPUproperty 
public var resizeForGPU:Boolean = false

Constructor Detail
BitmapTextureResource()Constructor
public function BitmapTextureResource(data:BitmapData, resizeForGPU:Boolean = false)

Uploads textures from BitmapData to GPU.

Parameters
data:BitmapData
 
resizeForGPU:Boolean (default = false)
Method Detail
upload()method
override public function upload(context3D:Context3D):void

Uploads resource into given Context3D.

Parameters

context3D:Context3DContext3D to which resource will uploaded.