0
  • 聊天消息
  • 系统消息
  • 评论与回复
登录后你可以
  • 下载海量资料
  • 学习在线课程
  • 观看技术视频
  • 写文章/发帖/加入社区
会员中心
创作中心

完善资料让更多小伙伴认识你,还能领取20积分哦,立即完善>

3天内不再提示

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

jf_46214456 来源:jf_46214456 作者:jf_46214456 2024-05-30 09:31 次阅读

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

鸿蒙文档.png

方法HarmonyOSOpenHarmony鸿蒙文档籽料: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)

审核编辑 黄宇

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

    关注

    33

    文章

    8486

    浏览量

    150804
  • 图形图像
    +关注

    关注

    0

    文章

    6

    浏览量

    969
  • 鸿蒙
    +关注

    关注

    57

    文章

    2306

    浏览量

    42728
收藏 人收藏

    评论

    相关推荐

    深入浅出,带你了解Qualcomm的图形图像优化之道

    用户的青睐,为此在2017年8月Qualcomm在深圳、北京、上海举行了三场“探索移动图形图像处理——Qualcomm开发者公开课”,全面向开发者介绍深层次的移动端图形图像的优化之道!
    发表于 09-07 13:47 7336次阅读

    鸿蒙OS元服务开发案例:【WebGL网页图形开发着色器绘制彩色三角形】

    使用WebGL开发时,为保证界面图形显示效果,请使用真机运行。
    的头像 发表于 04-02 15:12 1809次阅读

    鸿蒙开发WebGL】简单了解

    WebGL的全称为Web Graphic Library(网页图形库),主要用于交互式渲染2D图形和3D图形。目前HarmonyOS中使用的WebG
    发表于 02-25 21:56

    鸿蒙原生应用元服务开发-WebGL网页图形开发概述

    。 JavaScript engine为图形框架,为WebGL模块提供绘制对象Surface。 WebGL模块对外暴露OpenGL ES的GPU绘制接口。 中间
    发表于 03-08 14:24

    鸿蒙原生应用元服务开发-WebGL网页图形开发接口说明

    一、场景介绍 WebGL主要帮助开发者在前端开发中完成图形图像的相关处理,比如绘制彩色图形等。目前该功能仅支持使用兼容JS的类Web
    发表于 03-11 15:51

    图形图像处理技术大会抢座中

    图形图像处理技术大会抢座中全球顶级专家和企业参与。中国电子学会继云计算大会、物联网大会、传感器大会后又一年度盛会。技术交流、方案展示、产品发布---期待您的参与。
    发表于 09-16 14:14

    北京将召开图形图像技术应用交流大会 2013年11月将在北京...

    北京将召开图形图像技术应用交流大会 2013年11月将在北京举行图形图像技术应用大会,大会将邀请国内图像图形处理技术领域的著名专家,就图形图像处理技术的应用和最新动态特邀报告。敬请关注
    发表于 09-17 15:02

    北京将召开图形图像技术应用交流大会 2013年11月将在北京...

    北京将召开图形图像技术应用交流大会2013年11月将在北京举行图形图像技术应用大会,大会将邀请国内图像图形处理技术领域的著名专家,就图形图像处理技术的应用和最新动态特邀报告。敬请关注中
    发表于 09-17 15:06

    计算机图形图像处理最新应用分析

    计算机图形图像处理最新应用分析 图形图像处理是研究计算机除了图形图像的原理、方法和技术的科学。它是计算机科学和应用的重要分支之一,同时随着计算机技术的发展,图形图像技术在土木工程、机械
    发表于 09-23 14:56

    主要做图形图像处理,求助板子选择!

    各位前辈大家好!我主要是做C/C++项目开发的,最近项目需要用到FPGA板子来做图形图像处理,困于自己对FPGA还不了解,特来求助大家啊!{:1:}我想要实现的功能是读取SD卡中的视频然后将视频里面
    发表于 03-30 20:19

    图形图像处理实验的工程文件免费下载

      本文档的主要内容详细介绍的是图形图像处理实验的工程文件免费下载。
    发表于 11-03 17:50 9次下载
    <b class='flag-5'>图形图像</b>处理实验的工程文件免费下载

    鸿蒙开发图形图像——@ohos.effectKit (图像效果)

    图像效果提供处理图像的一些基础能力,包括对当前图像的亮度调节、模糊化、灰度调节、智能取色等。 该模块提供以下图像效果相关的常用功能: Filter:效果类,用于添加指定效果到
    的头像 发表于 02-22 16:08 353次阅读
    <b class='flag-5'>鸿蒙</b><b class='flag-5'>开发</b><b class='flag-5'>图形图像</b>——@ohos.effectKit (<b class='flag-5'>图像</b>效果)

    鸿蒙OS元服务开发说明:【WebGL网页图形开发接口

    WebGL主要帮助开发者在前端开发中完成图形图像的相关处理,比如绘制彩色图形等。目前该功能仅支持使用兼容JS的类Web
    的头像 发表于 04-02 17:02 435次阅读
    <b class='flag-5'>鸿蒙</b>OS元服务<b class='flag-5'>开发</b>说明:【<b class='flag-5'>WebGL</b>网页<b class='flag-5'>图形</b>库<b class='flag-5'>开发</b><b class='flag-5'>接口</b>】

    鸿蒙OS元服务开发:【WebGL网页图形开发概述】

    WebGL的全称为Web Graphic Library(网页图形库),主要用于交互式渲染2D图形和3D图形。目前HarmonyOS中使用的WebG
    的头像 发表于 04-02 17:26 399次阅读
    <b class='flag-5'>鸿蒙</b>OS元服务<b class='flag-5'>开发</b>:【<b class='flag-5'>WebGL</b>网页<b class='flag-5'>图形</b>库<b class='flag-5'>开发</b>概述】

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

    WebGL2支持图形的绘制,包括对当前绘制图形的位置、颜色等进行处理,其中相对WebGL来说对渲染管道和着色语言进行了增强。
    的头像 发表于 05-30 15:19 489次阅读
    <b class='flag-5'>鸿蒙</b><b class='flag-5'>开发</b><b class='flag-5'>接口</b><b class='flag-5'>图形图像</b>:【<b class='flag-5'>WebGL</b>2】