| Package | laya.webgl.utils |
| Class | public class Buffer2D |
| Inheritance | Buffer2D Buffer laya.resource.Resource |
| Subclasses | IndexBuffer2D, VertexBuffer2D |
| Property | Defined By | ||
|---|---|---|---|
![]() | _bindActive : Object [static] | Buffer | |
![]() | _bindVertexBuffer : * [static] | Buffer | |
| bufferLength : int [read-only] | Buffer2D | ||
![]() | bufferUsage : int [read-only] | Buffer | |
| byteLength : int [write-only] | Buffer2D | ||
![]() | _byteLength : int = 0 | Buffer | |
![]() | _enableAtributes : Array [static] | Buffer | |
| _upload : Boolean = true | Buffer2D | ||
| Property | Defined By | ||
|---|---|---|---|
![]() | _buffer : * | Buffer | |
![]() | _bufferType : int | Buffer | |
![]() | _bufferUsage : int | Buffer | |
![]() | _gl : WebGLContext [static] | Buffer | |
![]() | _glBuffer : * | Buffer | |
| _maxsize : int = 0 | Buffer2D | ||
| _uploadSize : int = 0 | Buffer2D | ||
| Method | Defined By | ||
|---|---|---|---|
Buffer2D() | Buffer2D | ||
__int__(gl:WebGLContext):void [static] | Buffer2D | ||
![]() | _bind():void | Buffer | |
_bind_subUpload(offset:int = 0, dataStart:int = 0, dataLength:int = 0):Boolean | Buffer2D | ||
_bind_upload():Boolean | Buffer2D | ||
_resizeBuffer(nsz:int, copy:Boolean):Buffer2D | Buffer2D | ||
append(data:*):void | Buffer2D | ||
appendEx(data:*, type:Class):void | Buffer2D | ||
appendEx2(data:*, type:Class, dataLen:int, perDataLen:int = 1):void | Buffer2D | ||
clear():void | Buffer2D | ||
getBuffer():ArrayBuffer | Buffer2D | ||
getNeedUpload():Boolean | Buffer2D | ||
setNeedUpload():void | Buffer2D | ||
subUpload(offset:int = 0, dataStart:int = 0, dataLength:int = 0):Boolean | Buffer2D | ||
upload():Boolean | Buffer2D | ||
| Method | Defined By | ||
|---|---|---|---|
_bufferData():void | Buffer2D | ||
_bufferSubData(offset:int = 0, dataStart:int = 0, dataLength:int = 0):void | Buffer2D | ||
_checkArrayUse():void | Buffer2D | ||
detoryResource():void [override] | Buffer2D | ||
![]() | recreateResource():void [override] | Buffer | |
| Constant | Defined By | ||
|---|---|---|---|
| FLOAT32 : int = 4 [static] | Buffer2D | ||
| SHORT : int = 2 [static] | Buffer2D | ||
| _maxsize | property |
protected var _maxsize:int = 0| _upload | property |
public var _upload:Boolean = true| _uploadSize | property |
protected var _uploadSize:int = 0| bufferLength | property |
bufferLength:int [read-only] public function get bufferLength():int| byteLength | property |
byteLength:int [write-only] public function set byteLength(value:int):void| Buffer2D | () | Constructor |
public function Buffer2D()| __int__ | () | method |
| _bind_subUpload | () | method |
public function _bind_subUpload(offset:int = 0, dataStart:int = 0, dataLength:int = 0):BooleanParameters
offset:int (default = 0) | |
dataStart:int (default = 0) | |
dataLength:int (default = 0) |
Boolean |
| _bind_upload | () | method |
public function _bind_upload():BooleanReturnsBoolean |
| _bufferData | () | method |
protected function _bufferData():void| _bufferSubData | () | method |
protected function _bufferSubData(offset:int = 0, dataStart:int = 0, dataLength:int = 0):voidParameters
offset:int (default = 0) | |
dataStart:int (default = 0) | |
dataLength:int (default = 0) |
| _checkArrayUse | () | method |
protected function _checkArrayUse():void| _resizeBuffer | () | method |
public function _resizeBuffer(nsz:int, copy:Boolean):Buffer2DParameters
nsz:int | |
copy:Boolean |
Buffer2D |
| append | () | method |
public function append(data:*):voidParameters
data:* |
| appendEx | () | method |
public function appendEx(data:*, type:Class):voidParameters
data:* | |
type:Class |
| appendEx2 | () | method |
public function appendEx2(data:*, type:Class, dataLen:int, perDataLen:int = 1):voidParameters
data:* | |
type:Class | |
dataLen:int | |
perDataLen:int (default = 1) |
| clear | () | method |
public function clear():void| detoryResource | () | method |
override protected function detoryResource():void| getBuffer | () | method |
public function getBuffer():ArrayBufferReturnsArrayBuffer |
| getNeedUpload | () | method |
public function getNeedUpload():BooleanReturnsBoolean |
| setNeedUpload | () | method |
public function setNeedUpload():void| subUpload | () | method |
public function subUpload(offset:int = 0, dataStart:int = 0, dataLength:int = 0):BooleanParameters
offset:int (default = 0) | |
dataStart:int (default = 0) | |
dataLength:int (default = 0) |
Boolean |
| upload | () | method |
public function upload():BooleanReturnsBoolean |
| FLOAT32 | Constant |
public static const FLOAT32:int = 4| SHORT | Constant |
public static const SHORT:int = 2