Packagelaya.webgl.resource
Classpublic class WebGLCanvas
InheritanceWebGLCanvas Inheritance laya.resource.Bitmap



Public Properties
 PropertyDefined By
  asBitmap : Boolean
[write-only]
WebGLCanvas
  _canvas : *
HTML Canvas
WebGLCanvas
  context : Context
[read-only]
WebGLCanvas
  _createContext : Function
[static]
WebGLCanvas
  iscpuSource : Boolean
WebGLCanvas
Public Methods
 MethodDefined By
  
_setContext(context:Context):void
WebGLCanvas
  
clear():void
WebGLCanvas
  
destroy():void
WebGLCanvas
  
WebGLCanvas
  
getContext(contextID:String, other:* = null):Context
WebGLCanvas
  
size(w:Number, h:Number):void
WebGLCanvas
  
texSubImage2D(webglCanvas:WebGLCanvas, xoffset:Number, yoffset:Number):void
WebGLCanvas
Protected Methods
 MethodDefined By
  
[override]
WebGLCanvas
  
[override]
WebGLCanvas
Property Detail
_canvasproperty
public var _canvas:*

HTML Canvas

_createContextproperty 
public static var _createContext:Function

asBitmapproperty 
asBitmap:Boolean  [write-only]


Implementation
    public function set asBitmap(value:Boolean):void
contextproperty 
context:Context  [read-only]


Implementation
    public function get context():Context
iscpuSourceproperty 
public var iscpuSource:Boolean

Method Detail
_setContext()method
public function _setContext(context:Context):void

Parameters

context:Context

clear()method 
public function clear():void

destroy()method 
public function destroy():void

detoryResource()method 
override protected function detoryResource():void

getCanvas()method 
public function getCanvas():*

Returns
*
getContext()method 
public function getContext(contextID:String, other:* = null):Context

Parameters

contextID:String
 
other:* (default = null)

Returns
Context
recreateResource()method 
override protected function recreateResource():void

size()method 
public function size(w:Number, h:Number):void

Parameters

w:Number
 
h:Number

texSubImage2D()method 
public function texSubImage2D(webglCanvas:WebGLCanvas, xoffset:Number, yoffset:Number):void

Parameters

webglCanvas:WebGLCanvas
 
xoffset:Number
 
yoffset:Number