鸿蒙开发接口图形图像:【WebGL】

电子说

1.3w人已加入

描述

WebGL

WebGL提供图形绘制的能力,包括对当前绘制图形的位置、颜色等进行处理。

WebGL标准图形API,对应OpenGL ES 2.0特性集。

说明:
开发前请熟悉鸿蒙开发指导文档 :[gitee.com/li-shizhen-skin/harmony-os/blob/master/README.md]
本模块首批接口从API version 7开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。

调用方式

hml内创建canvas,示例如下:

< !--xxx.hml-- >
< div class="container" >
    < canvas ref="canvas1" style="width : 400px; height : 200px; background-color : lightyellow;" >< /canvas >
    < button class="btn-button" onclick="BtnDraw2D" >BtnDraw2D< /button >
< /div >

js内获取canvas实例,示例如下:

// 获取canvas组件实例
const el = this.$refs.canvas1;
// 从canvas组件实例获取WebGL上下文
const gl = el.getContext('webgl');
// 调用WebGL API
gl.clearColor(0.0, 0.0, 0.0, 1.0);

Type

系统能力: 以下各项对应的系统能力均为 SystemCapability.Graphic.Graphic2D.WebGL。

表1 Type

名称类型
GLenumnumber
GLbooleanboolean
GLbitfieldnumber
GLbytenumber
GLshortnumber
GLintnumber
GLsizeinumber
GLintptrnumber
GLsizeiptrnumber
GLubytenumber
GLushortnumber
GLuintnumber
GLfloatnumber
GLclampfnumber
TexImageSourceImageData
Float32Listarray
Int32Listarray
WebGLPowerPreferencestring

Interface

系统能力: 以下各项对应的系统能力均为 SystemCapability.Graphic.Graphic2D.WebGL。

表2 Interface

名称
[WebGLContextAttributes]
WebGLBuffer
WebGLFrameBuffer
WebGLProgram
WebGLRenderbuffer
WebGLShader
WebGLTexture
WebGLUniformLocation
[WebGLActiveInfo]
[WebGLShaderPrecisionFormat]
[WebGLRenderingContextBase]
[WebGLRenderingContextOverloads]

WebGLContextAttributes

WebGLContextAttributes

名称参数类型必填
alphaboolean
depthboolean
stencilboolean
antialiasboolean
premultipliedAlphaboolean
preserveDrawingBufferboolean
powerPreferenceWebGLPowerPreference
failIfMajorPerformanceCaveatboolean
desynchronizedboolean

WebGLActiveInfo

WebGLActiveInfo

名称参数类型必填
sizeGLint
typeGLenum
namestring

WebGLShaderPrecisionFormat

WebGLShaderPrecisionFormat

名称参数类型必填
rangeMinGLint
rangeMaxGLint
precisionGLint

WebGLRenderingContextBase

WebGLRenderingContextBase

属性

名称参数类型必填
DEPTH_BUFFER_BITGLenum
STENCIL_BUFFER_BITGLenum
COLOR_BUFFER_BITGLenum
POINTSGLenum
LINESGLenum
LINE_LOOPGLenum
LINE_STRIPGLenum
TRIANGLESGLenum
TRIANGLE_STRIPGLenum
TRIANGLE_FANGLenum
ZEROGLenum
ONEGLenum
SRC_COLORGLenum
ONE_MINUS_SRC_COLORGLenum
SRC_ALPHAGLenum
ONE_MINUS_SRC_ALPHAGLenum
DST_ALPHAGLenum
ONE_MINUS_DST_ALPHAGLenum
DST_COLORGLenum
ONE_MINUS_DST_COLORGLenum
SRC_ALPHA_SATURATEGLenum
FUNC_ADDGLenum
BLEND_EQUATIONGLenum
BLEND_EQUATION_RGBGLenum
BLEND_EQUATION_ALPHAGLenum
FUNC_SUBTRACTGLenum
FUNC_REVERSE_SUBTRACTGLenum
BLEND_DST_RGBGLenum
BLEND_SRC_RGBGLenum
BLEND_DST_ALPHAGLenum
BLEND_SRC_ALPHAGLenum
CONSTANT_COLORGLenum
ONE_MINUS_CONSTANT_COLORGLenum
CONSTANT_ALPHAGLenum
ONE_MINUS_CONSTANT_ALPHAGLenum
BLEND_COLORGLenum
ARRAY_BUFFERGLenum
ELEMENT_ARRAY_BUFFERGLenum
ARRAY_BUFFER_BINDINGGLenum
ELEMENT_ARRAY_BUFFER_BINDINGGLenum
STREAM_DRAWGLenum
STATIC_DRAWGLenum
DYNAMIC_DRAWGLenum
BUFFER_SIZEGLenum
BUFFER_USAGEGLenum
CURRENT_VERTEX_ATTRIBGLenum
FRONTGLenum
BACKGLenum
FRONT_AND_BACKGLenum
CULL_FACEGLenum
BLENDGLenum
DITHERGLenum
STENCIL_TESTGLenum
DEPTH_TESTGLenum
SCISSOR_TESTGLenum
POLYGON_OFFSET_FILLGLenum
SAMPLE_ALPHA_TO_COVERAGEGLenum
SAMPLE_COVERAGEGLenum
NO_ERRORGLenum
INVALID_ENUMGLenum
INVALID_VALUEGLenum
INVALID_OPERATIONGLenum
OUT_OF_MEMORYGLenum
CWGLenum
CCWGLenum
LINE_WIDTHGLenum
ALIASED_POINT_SIZE_RANGEGLenum
ALIASED_LINE_WIDTH_RANGEGLenum
CULL_FACE_MODEGLenum
FRONT_FACEGLenum
DEPTH_RANGEGLenum
DEPTH_WRITEMASKGLenum
DEPTH_CLEAR_VALUEGLenum
DEPTH_FUNCGLenum
STENCIL_CLEAR_VALUEGLenum
STENCIL_FUNCGLenum
STENCIL_FAILGLenum
STENCIL_PASS_DEPTH_FAILGLenum
STENCIL_PASS_DEPTH_PASSGLenum
STENCIL_REFGLenum
STENCIL_VALUE_MASKGLenum
STENCIL_WRITEMASKGLenum
STENCIL_BACK_FUNCGLenum
STENCIL_BACK_FAILGLenum
STENCIL_BACK_PASS_DEPTH_FAILGLenum
STENCIL_BACK_PASS_DEPTH_PASSGLenum
STENCIL_BACK_REFGLenum
STENCIL_BACK_VALUE_MASKGLenum
STENCIL_BACK_WRITEMASKGLenum
VIEWPORTGLenum
SCISSOR_BOXGLenum
COLOR_CLEAR_VALUEGLenum
COLOR_WRITEMASKGLenum
UNPACK_ALIGNMENTGLenum
PACK_ALIGNMENTGLenum
MAX_TEXTURE_SIZEGLenum
MAX_VIEWPORT_DIMSGLenum
SUBPIXEL_BITSGLenum
RED_BITSGLenum
GREEN_BITSGLenum
BLUE_BITSGLenum
ALPHA_BITSGLenum
DEPTH_BITSGLenum
STENCIL_BITSGLenum
POLYGON_OFFSET_UNITSGLenum
POLYGON_OFFSET_FACTORGLenum
TEXTURE_BINDING_2DGLenum
SAMPLE_BUFFERSGLenum
SAMPLESGLenum
SAMPLE_COVERAGE_VALUEGLenum
SAMPLE_COVERAGE_INVERTGLenum
COMPRESSED_TEXTURE_FORMATSGLenum
DONT_CAREGLenum
FASTESTGLenum
NICESTGLenum
GENERATE_MIPMAP_HINTGLenum
BYTEGLenum
UNSIGNED_BYTEGLenum
SHORTGLenum
UNSIGNED_SHORTGLenum
INTGLenum
UNSIGNED_INTGLenum
FLOATGLenum
DEPTH_COMPONENTGLenum
ALPHAGLenum
RGBGLenum
RGBAGLenum
LUMINANCEGLenum
LUMINANCE_ALPHAGLenum
UNSIGNED_SHORT_4_4_4_4GLenum
UNSIGNED_SHORT_5_5_5_1GLenum
UNSIGNED_SHORT_5_6_5GLenum
FRAGMENT_SHADERGLenum
VERTEX_SHADERGLenum
MAX_VERTEX_ATTRIBSGLenum
MAX_VERTEX_UNIFORM_VECTORSGLenum
MAX_VARYING_VECTORSGLenum
MAX_COMBINED_TEXTURE_IMAGE_UNITSGLenum
MAX_VERTEX_TEXTURE_IMAGE_UNITSGLenum
MAX_TEXTURE_IMAGE_UNITSGLenum
MAX_FRAGMENT_UNIFORM_VECTORSGLenum
SHADER_TYPEGLenum
DELETE_STATUSGLenum
LINK_STATUSGLenum
VALIDATE_STATUSGLenum
ATTACHED_SHADERSGLenum
ACTIVE_UNIFORMSGLenum
ACTIVE_ATTRIBUTESGLenum
SHADING_LANGUAGE_VERSIONGLenum
CURRENT_PROGRAMGLenum
NEVERGLenum
LESSGLenum
EQUALGLenum
LEQUALGLenum
GREATERGLenum
NOTEQUALGLenum
GEQUALGLenum
ALWAYSGLenum
KEEPGLenum
REPLACEGLenum
INCRGLenum
DECRGLenum
INVERTGLenum
INCR_WRAPGLenum
DECR_WRAPGLenum
VENDORGLenum
RENDERERGLenum
VERSIONGLenum
NEARESTGLenum
LINEARGLenum
NEAREST_MIPMAP_NEARESTGLenum
LINEAR_MIPMAP_NEARESTGLenum
NEAREST_MIPMAP_LINEARGLenum
LINEAR_MIPMAP_LINEARGLenum
TEXTURE_MIN_FILTERGLenum
TEXTURE_WRAP_SGLenum
TEXTURE_WRAP_TGLenum
TEXTURE_2DGLenum
TEXTUREGLenum
TEXTURE_CUBE_MAPGLenum
TEXTURE_BINDING_CUBE_MAPGLenum
TEXTURE_CUBE_MAP_POSITIVE_XGLenum
TEXTURE_CUBE_MAP_NEGATIVE_XGLenum
TEXTURE_CUBE_MAP_POSITIVE_YGLenum
TEXTURE_CUBE_MAP_NEGATIVE_YGLenum
TEXTURE_CUBE_MAP_POSITIVE_ZGLenum
TEXTURE_CUBE_MAP_NEGATIVE_ZGLenum
MAX_CUBE_MAP_TEXTURE_SIZEGLenum
TEXTURE0GLenum
TEXTURE1GLenum
TEXTURE2GLenum
TEXTURE3GLenum
TEXTURE4GLenum
TEXTURE5GLenum
TEXTURE6GLenum
TEXTURE7GLenum
TEXTURE8GLenum
TEXTURE9GLenum
TEXTURE10GLenum
TEXTURE11GLenum
TEXTURE12GLenum
TEXTURE13GLenum
TEXTURE14GLenum
TEXTURE15GLenum
TEXTURE16GLenum
TEXTURE17GLenum
TEXTURE18GLenum
TEXTURE19GLenum
TEXTURE20GLenum
TEXTURE21GLenum
TEXTURE22GLenum
TEXTURE23GLenum
TEXTURE24GLenum
TEXTURE25GLenum
TEXTURE26GLenum
TEXTURE27GLenum
TEXTURE28GLenum
TEXTURE29GLenum
TEXTURE30GLenum
TEXTURE31GLenum
ACTIVE_TEXTUREGLenum
REPEATGLenum
CLAMP_TO_EDGEGLenum
MIRRORED_REPEATGLenum
FLOAT_VEC2GLenum
FLOAT_VEC3GLenum
FLOAT_VEC4GLenum
INT_VEC2GLenum
INT_VEC3GLenum
INT_VEC4GLenum
BOOLGLenum
BOOL_VEC2GLenum
BOOL_VEC3GLenum
BOOL_VEC4GLenum
FLOAT_MAT2GLenum
FLOAT_MAT3GLenum
FLOAT_MAT4GLenum
SAMPLER_2DGLenum
SAMPLER_CUBEGLenum
VERTEX_ATTRIB_ARRAY_ENABLEDGLenum
VERTEX_ATTRIB_ARRAY_SIZEGLenum
VERTEX_ATTRIB_ARRAY_STRIDEGLenum
VERTEX_ATTRIB_ARRAY_TYPEGLenum
VERTEX_ATTRIB_ARRAY_NORMALIZEDGLenum
VERTEX_ATTRIB_ARRAY_POINTERGLenum
VERTEX_ATTRIB_ARRAY_BUFFER_BINDINGGLenum
IMPLEMENTATION_COLOR_READ_TYPEGLenum
IMPLEMENTATION_COLOR_READ_FORMATGLenum
COMPILE_STATUSGLenum
LOW_FLOATGLenum
MEDIUM_FLOATGLenum
HIGH_FLOATGLenum
LOW_INTGLenum
MEDIUM_INTGLenum
HIGH_INTGLenum
FRAMEBUFFERGLenum
RENDERBUFFERGLenum
RGBA4GLenum
RGB5_A1GLenum
RGB565GLenum
DEPTH_COMPONENT16GLenum
STENCIL_INDEX8GLenum
DEPTH_STENCILGLenum
RENDERBUFFER_WIDTHGLenum
RENDERBUFFER_HEIGHTGLenum
RENDERBUFFER_INTERNAL_FORMATGLenum
RENDERBUFFER_RED_SIZEGLenum
RENDERBUFFER_GREEN_SIZEGLenum
RENDERBUFFER_BLUE_SIZEGLenum
RENDERBUFFER_ALPHA_SIZEGLenum
RENDERBUFFER_DEPTH_SIZEGLenum
RENDERBUFFER_STENCIL_SIZEGLenum
FRAMEBUFFER_ATTACHMENT_OBJECT_TYPEGLenum
FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVELGLenum
FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACEGLenum
COLOR_ATTACHMENT0GLenum
DEPTH_ATTACHMENTGLenum
STENCIL_ATTACHMENTGLenum
DEPTH_STENCIL_ATTACHMENTGLenum
NONEGLenum
FRAMEBUFFER_COMPLETEGLenum
FRAMEBUFFER_INCOMPLETE_ATTACHMENTGLenum
FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENTGLenum
FRAMEBUFFER_INCOMPLETE_DIMENSIONSGLenum
FRAMEBUFFER_UNSUPPORTEDGLenum
FRAMEBUFFER_BINDINGGLenum
RENDERBUFFER_BINDINGGLenum
MAX_RENDERBUFFER_SIZEGLenum
INVALID_FRAMEBUFFER_OPERATIONGLenum
UNPACK_FLIP_Y_WEBGLGLenum
UNPACK_PREMULTIPLY_ALPHA_WEBGLGLenum
CONTEXT_LOST_WEBGLGLenum
UNPACK_COLORSPACE_CONVERSION_WEBGLGLenum
BROWSER_DEFAULT_WEBGLGLenum
canvasHTMLCanvasElementOffscreenCanvas
drawingBufferWidthGLsizei
drawingBufferHeightGLsizei

方法

方法返回值类型
getContextAttributes()WebGLContextAttributes
isContextLost()boolean
getSupportedExtensions()string[]
getExtension(name: string)any
activeTexture(texture: GLenum)void
attachShader(program: WebGLProgram, shader: WebGLShader)void
bindAttribLocation(program: WebGLProgram, index: GLuint, name: string)void
bindBuffer(target: GLenum, buffer: WebGLBuffernull)
bindFramebuffer(target: GLenum, framebuffer: WebGLFramebuffernull)
bindRenderbuffer(target: GLenum, renderbuffer: WebGLRenderbuffernull)
bindTexture(target: GLenum, texture: WebGLTexturenull)
blendColor(red: GLclampf, green: GLclampf, blue: GLclampf, alpha: GLclampf)void
blendEquation(mode: GLenum)void
blendEquationSeparate(modeRGB: GLenum, modeAlpha: GLenum)void
blendFunc(sfactor: GLenum, dfactor: GLenum)void
blendFuncSeparate(srcRGB: GLenum, dstRGB: GLenum, srcAlpha: GLenum, dstAlpha: GLenum)void
checkFramebufferStatus(target: GLenum)GLenum
clear(mask: GLbitfield)void
clearColor(red: GLclampf, green: GLclampf, blue: GLclampf, alpha: GLclampf)void
clearDepth(depth: GLclampf)void
clearStencil(s: GLint)void
colorMask(red: GLboolean, green: GLboolean, blue: GLboolean, alpha: GLboolean)void
compileShader(shader: WebGLShader)void
copyTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, x: GLint, y: GLint, width: GLsizei, height: GLsizei, border: GLint)void
copyTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, x: GLint, y: GLint, width: GLsizei, height: GLsizei)void
createBuffer()WebGLBuffer
createFramebuffer()WebGLFramebuffer
createProgram()WebGLProgram
createRenderbuffer()WebGLRenderbuffer
createShader(type: GLenum)WebGLShader
createTexture()WebGLTexture
cullFace(mode: GLenum)void
deleteBuffer(buffer: WebGLBuffernull)
deleteFramebuffer(framebuffer: WebGLFramebuffernull)
deleteProgram(program: WebGLProgramnull)
deleteRenderbuffer(renderbuffer: WebGLRenderbuffernull)
deleteShader(shader: WebGLShadernull)
deleteTexture(texture: WebGLTexturenull)
depthFunc(func: GLenum)void
depthMask(flag: GLboolean)void
depthRange(zNear: GLclampf, zFar: GLclampf)void
detachShader(program: WebGLProgram, shader: WebGLShader)void
disable(cap: GLenum)void
disableVertexAttribArray(index: GLuint)void
drawArrays(mode: GLenum, first: GLint, count: GLsizei)void
drawElements(mode: GLenum, count: GLsizei, type: GLenum, offset: GLintptr)void
enable(cap: GLenum)void
enableVertexAttribArray(index: GLuint)void
finish()void
flush()void
framebufferRenderbuffer(target: GLenum, attachment: GLenum, renderbuffertarget: GLenum, renderbuffer: WebGLRenderbuffernull)
framebufferTexture2D(target: GLenum, attachment: GLenum, textarget: GLenum, texture: WebGLTexturenull, level: GLint)
frontFace(mode: GLenum)void
generateMipmap(target: GLenum)void
getActiveAttrib(program: WebGLProgram, index: GLuint)WebGLActiveInfo
getActiveUniform(program: WebGLProgram, index: GLuint)WebGLActiveInfo
getAttachedShaders(program: WebGLProgram)WebGLShader[]
getAttribLocation(program: WebGLProgram, name: string)GLint
getBufferParameter(target: GLenum, pname: GLenum)any
getParameter(pname: GLenum)any
getError()GLenum
getFramebufferAttachmentParameter(target: GLenum, attachment: GLenum, pname: GLenum)any
getProgramParameter(program: WebGLProgram, pname: GLenum)any
getProgramInfoLog(program: WebGLProgram)string
getRenderbufferParameter(target: GLenum, pname: GLenum)any
getShaderParameter(shader: WebGLShader, pname: GLenum)any
getShaderPrecisionFormat(shadertype: GLenum, precisiontype: GLenum)WebGLShaderPrecisionFormat
getShaderInfoLog(shader: WebGLShader)string
getShaderSource(shader: WebGLShader)string
getTexParameter(target: GLenum, pname: GLenum)any
getUniform(program: WebGLProgram, location: WebGLUniformLocation)any
getUniformLocation(program: WebGLProgram, name: string)WebGLUniformLocation
getVertexAttrib(index: GLuint, pname: GLenum)any
getVertexAttribOffset(index: GLuint, pname: GLenum)GLintptr
hint(target: GLenum, mode: GLenum)void
isBuffer(buffer: WebGLBuffernull)
isEnabled(cap: GLenum)GLboolean
isFramebuffer(framebuffer: WebGLFramebuffernull)
isProgram(program: WebGLProgramnull)
isRenderbuffer(renderbuffer: WebGLRenderbuffernull)
isShader(shader: WebGLShadernull)
isTexture(texture: WebGLTexturenull)
lineWidth(width: GLfloat)void
linkProgram(program: WebGLProgram)void
pixelStorei(pname: GLenum, param: GLintGLboolean)
polygonOffset(factor: GLfloat, units: GLfloat)void
renderbufferStorage(target: GLenum, internalformat: GLenum, width: GLsizei, height: GLsizei)void
sampleCoverage(value: GLclampf, invert: GLboolean)void
scissor(x: GLint, y: GLint, width: GLsizei, height: GLsizei)void
shaderSource(shader: WebGLShader, source: string)void
stencilFunc(func: GLenum, ref: GLint, mask: GLuint)void
stencilFuncSeparate(face: GLenum, func: GLenum, ref: GLint, mask: GLuint)void
stencilMask(mask: GLuint)void
stencilMaskSeparate(face: GLenum, mask: GLuint)void
stencilOp(fail: GLenum, zfail: GLenum, zpass: GLenum)void
stencilOpSeparate(face: GLenum, fail: GLenum, zfail: GLenum, zpass: GLenum)void
texParameterf(target: GLenum, pname: GLenum, param: GLfloat)void
texParameteri(target: GLenum, pname: GLenum, param: GLint)void
uniform1f(location: WebGLUniformLocationnull, x: GLfloat)
uniform2f(location: WebGLUniformLocationnull, x: GLfloat, y: GLfloat)
uniform3f(location: WebGLUniformLocationnull, x: GLfloat, y: GLfloat, z: GLfloat)
uniform4f(location: WebGLUniformLocationnull, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat)
uniform1i(location: WebGLUniformLocationnull, x: GLint)
uniform2i(location: WebGLUniformLocationnull, x: GLint, y: GLint)
uniform3i(location: WebGLUniformLocationnull, x: GLint, y: GLint, z: GLint)
uniform4i(location: WebGLUniformLocationnull, x: GLint, y: GLint, z: GLint, w: GLint)
useProgram(program: WebGLProgramnull)
validateProgram(program: WebGLProgram)void
vertexAttrib1f(index: GLuint, x: GLfloat)void
vertexAttrib2f(index: GLuint, x: GLfloat, y: GLfloat)void
vertexAttrib3f(index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat)void
vertexAttrib4f(index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat)void
vertexAttrib1fv(index: GLuint, values: Float32List)void
vertexAttrib2fv(index: GLuint, values: Float32List)void
vertexAttrib3fv(index: GLuint, values: Float32List)void
vertexAttrib4fv(index: GLuint, values: Float32List)void
vertexAttribPointer(index: GLuint, size: GLint, type: GLenum, normalized: GLboolean, stride: GLsizei, offset: GLintptr)void
viewport(x: GLint, y: GLint, width: GLsizei, height: GLsizei)void

WebGLRenderingContextOverloads

WebGLRenderingContextOverloads

图形图像

方法HarmonyOS与OpenHarmony鸿蒙文档籽料:mau123789是v直接拿返回值类型
bufferData(target: GLenum, size: GLsizeiptr, usage: GLenum)void
bufferData(target: GLenum, data: BufferSourcenull, usage: GLenum)
bufferSubData(target: GLenum, offset: GLintptr, data: BufferSource)void
compressedTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, data: ArrayBufferView)void
compressedTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, data: ArrayBufferView)void
readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferViewnull)
texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, pixels: ArrayBufferViewnull)
texImage2D(target: GLenum, level: GLint, internalformat: GLint, format: GLenum, type: GLenum, source: TexImageSource)void
texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferViewnull)
texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, format: GLenum, type: GLenum, source: TexImageSource)void
uniform1fv(location: WebGLUniformLocationnull, v: Float32List)
uniform2fv(location: WebGLUniformLocationnull, v: Float32List)
uniform3fv(location: WebGLUniformLocationnull, v: Float32List)
uniform4fv(location: WebGLUniformLocationnull, v: Float32List)
uniform1iv(location: WebGLUniformLocationnull, v: Int32List)
uniform2iv(location: WebGLUniformLocationnull, v: Int32List)
uniform3iv(location: WebGLUniformLocationnull, v: Int32List)
uniform4iv(location: WebGLUniformLocationnull, v: Int32List)
uniformMatrix2fv(location: WebGLUniformLocationnull, transpose: GLboolean, value: Float32List)
uniformMatrix3fv(location: WebGLUniformLocationnull, transpose: GLboolean, value: Float32List)
uniformMatrix4fv(location: WebGLUniformLocationnull, transpose: GLboolean, value: Float32List)

审核编辑 黄宇

打开APP阅读更多精彩内容
声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容侵权或者其他违规问题,请联系本站处理。 举报投诉

全部0条评论

快来发表一下你的评论吧 !

×
20
完善资料,
赚取积分