Constructor
new WebglRenderer(canvas, context)
Parameters:
Name | Type | Description |
---|---|---|
canvas |
||
context |
Members
_imgHeight
_imgWidth
_matrix
_matrixLocation
_orA
_positionBuffer
_positionLocation
_positions
_program
_scA
_texcoordBuffer
_texcoordLocation
_texcoords
_texture
_textureLocation
_textureMatrixLocation
_trA
_tranA
context
Methods
__fs()
Returns:
__injectScripts()
Returns:
__vs()
Returns:
_assembleProgram()
Returns:
_bindImageForWebglCopyPixels(img, webglContext)
Parameters:
Name | Type | Description |
---|---|---|
img |
||
webglContext |
Returns:
_orthographic(left, right, bottom, top, near, far, dst)
Parameters:
Name | Type | Description |
---|---|---|
left |
||
right |
||
bottom |
||
top |
||
near |
||
far |
||
dst |
Returns:
_scale(m, sx, sy, sz, dst)
Parameters:
Name | Type | Description |
---|---|---|
m |
||
sx |
||
sy |
||
sz |
||
dst |
Returns:
_translate(m, tx, ty, tz, dst)
Parameters:
Name | Type | Description |
---|---|---|
m |
||
tx |
||
ty |
||
tz |
||
dst |
Returns:
_translation(tx, ty, tz, dst)
Parameters:
Name | Type | Description |
---|---|---|
tx |
||
ty |
||
tz |
||
dst |
Returns:
clearRect(x, y, width, height)
Parameters:
Name | Type | Description |
---|---|---|
x |
||
y |
||
width |
||
height |
Returns:
copyPixels(source, fromRect, toMoverPoint, copyWidth, copyHeight)
Parameters:
Name | Type | Description |
---|---|---|
source |
||
fromRect |
||
toMoverPoint |
||
copyWidth |
||
copyHeight |
Returns:
getContext()
Returns:
readyWebglProgram()
Returns: