0
  • 聊天消息
  • 系統(tǒng)消息
  • 評論與回復(fù)
登錄后你可以
  • 下載海量資料
  • 學(xué)習(xí)在線課程
  • 觀看技術(shù)視頻
  • 寫文章/發(fā)帖/加入社區(qū)
會員中心
創(chuàng)作中心

完善資料讓更多小伙伴認識你,還能領(lǐng)取20積分哦,立即完善>

3天內(nèi)不再提示

鴻蒙開發(fā)接口圖形圖像:【W(wǎng)ebGL】

jf_46214456 ? 來源:jf_46214456 ? 作者:jf_46214456 ? 2024-05-30 09:31 ? 次閱讀

WebGL

WebGL提供圖形繪制的能力,包括對當(dāng)前繪制圖形的位置、顏色等進行處理。

WebGL標(biāo)準圖形API,對應(yīng)OpenGL ES 2.0特性集。

說明:
開發(fā)前請熟悉鴻蒙開發(fā)指導(dǎo)文檔 :[gitee.com/li-shizhen-skin/harmony-os/blob/master/README.md]
本模塊首批接口從API version 7開始支持。后續(xù)版本的新增接口,采用上角標(biāo)單獨標(biāo)記接口的起始版本。

調(diào)用方式

hml內(nèi)創(chuàng)建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內(nèi)獲取canvas實例,示例如下:

// 獲取canvas組件實例
const el = this.$refs.canvas1;
// 從canvas組件實例獲取WebGL上下文
const gl = el.getContext('webgl');
// 調(diào)用WebGL API
gl.clearColor(0.0, 0.0, 0.0, 1.0);

Type

系統(tǒng)能力: 以下各項對應(yīng)的系統(tǒng)能力均為 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

系統(tǒng)能力: 以下各項對應(yīng)的系統(tǒng)能力均為 SystemCapability.Graphic.Graphic2D.WebGL。

表2 Interface

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

WebGLContextAttributes

WebGLContextAttributes

名稱參數(shù)類型必填
alphaboolean
depthboolean
stencilboolean
antialiasboolean
premultipliedAlphaboolean
preserveDrawingBufferboolean
powerPreferenceWebGLPowerPreference
failIfMajorPerformanceCaveatboolean
desynchronizedboolean

WebGLActiveInfo

WebGLActiveInfo

名稱參數(shù)類型必填
sizeGLint
typeGLenum
namestring

WebGLShaderPrecisionFormat

WebGLShaderPrecisionFormat

名稱參數(shù)類型必填
rangeMinGLint
rangeMaxGLint
precisionGLint

WebGLRenderingContextBase

WebGLRenderingContextBase

屬性

名稱參數(shù)類型必填
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)

審核編輯 黃宇

聲明:本文內(nèi)容及配圖由入駐作者撰寫或者入駐合作網(wǎng)站授權(quán)轉(zhuǎn)載。文章觀點僅代表作者本人,不代表電子發(fā)燒友網(wǎng)立場。文章及其配圖僅供工程師學(xué)習(xí)之用,如有內(nèi)容侵權(quán)或者其他違規(guī)問題,請聯(lián)系本站處理。 舉報投訴
  • 接口
    +關(guān)注

    關(guān)注

    33

    文章

    8451

    瀏覽量

    150730
  • 圖形圖像
    +關(guān)注

    關(guān)注

    0

    文章

    6

    瀏覽量

    968
  • 鴻蒙
    +關(guān)注

    關(guān)注

    57

    文章

    2303

    瀏覽量

    42691
收藏 人收藏

    評論

    相關(guān)推薦

    深入淺出,帶你了解Qualcomm的圖形圖像優(yōu)化之道

    用戶的青睞,為此在2017年8月Qualcomm在深圳、北京、上海舉行了三場“探索移動圖形圖像處理——Qualcomm開發(fā)者公開課”,全面向開發(fā)者介紹深層次的移動端圖形圖像的優(yōu)化之道!
    發(fā)表于 09-07 13:47 ?7332次閱讀

    鴻蒙OS元服務(wù)開發(fā)案例:【WebGL網(wǎng)頁圖形開發(fā)著色器繪制彩色三角形】

    使用WebGL開發(fā)時,為保證界面圖形顯示效果,請使用真機運行。
    的頭像 發(fā)表于 04-02 15:12 ?1789次閱讀

    鴻蒙開發(fā)WebGL】簡單了解

    WebGL的全稱為Web Graphic Library(網(wǎng)頁圖形庫),主要用于交互式渲染2D圖形和3D圖形。目前HarmonyOS中使用的WebG
    發(fā)表于 02-25 21:56

    鴻蒙原生應(yīng)用元服務(wù)開發(fā)-WebGL網(wǎng)頁圖形開發(fā)概述

    。 JavaScript engine為圖形框架,為WebGL模塊提供繪制對象Surface。 WebGL模塊對外暴露OpenGL ES的GPU繪制接口。 中間
    發(fā)表于 03-08 14:24

    鴻蒙原生應(yīng)用元服務(wù)開發(fā)-WebGL網(wǎng)頁圖形開發(fā)接口說明

    一、場景介紹 WebGL主要幫助開發(fā)者在前端開發(fā)中完成圖形圖像的相關(guān)處理,比如繪制彩色圖形等。目前該功能僅支持使用兼容JS的類Web
    發(fā)表于 03-11 15:51

    圖形圖像處理技術(shù)大會搶座中

    圖形圖像處理技術(shù)大會搶座中全球頂級專家和企業(yè)參與。中國電子學(xué)會繼云計算大會、物聯(lián)網(wǎng)大會、傳感器大會后又一年度盛會。技術(shù)交流、方案展示、產(chǎn)品發(fā)布---期待您的參與。
    發(fā)表于 09-16 14:14

    北京將召開圖形圖像技術(shù)應(yīng)用交流大會 2013年11月將在北京...

    北京將召開圖形圖像技術(shù)應(yīng)用交流大會 2013年11月將在北京舉行圖形圖像技術(shù)應(yīng)用大會,大會將邀請國內(nèi)圖像圖形處理技術(shù)領(lǐng)域的著名專家,就圖形圖像處理技術(shù)的應(yīng)用和最新動態(tài)特邀報告。敬請關(guān)注
    發(fā)表于 09-17 15:02

    北京將召開圖形圖像技術(shù)應(yīng)用交流大會 2013年11月將在北京...

    北京將召開圖形圖像技術(shù)應(yīng)用交流大會2013年11月將在北京舉行圖形圖像技術(shù)應(yīng)用大會,大會將邀請國內(nèi)圖像圖形處理技術(shù)領(lǐng)域的著名專家,就圖形圖像處理技術(shù)的應(yīng)用和最新動態(tài)特邀報告。敬請關(guān)注中
    發(fā)表于 09-17 15:06

    計算機圖形圖像處理最新應(yīng)用分析

    計算機圖形圖像處理最新應(yīng)用分析 圖形圖像處理是研究計算機除了圖形圖像的原理、方法和技術(shù)的科學(xué)。它是計算機科學(xué)和應(yīng)用的重要分支之一,同時隨著計算機技術(shù)的發(fā)展,圖形圖像技術(shù)在土木工程、機械
    發(fā)表于 09-23 14:56

    主要做圖形圖像處理,求助板子選擇!

    各位前輩大家好!我主要是做C/C++項目開發(fā)的,最近項目需要用到FPGA板子來做圖形圖像處理,困于自己對FPGA還不了解,特來求助大家啊!{:1:}我想要實現(xiàn)的功能是讀取SD卡中的視頻然后將視頻里面
    發(fā)表于 03-30 20:19

    圖形圖像處理實驗的工程文件免費下載

      本文檔的主要內(nèi)容詳細介紹的是圖形圖像處理實驗的工程文件免費下載。
    發(fā)表于 11-03 17:50 ?9次下載
    <b class='flag-5'>圖形圖像</b>處理實驗的工程文件免費下載

    鴻蒙開發(fā)圖形圖像——@ohos.effectKit (圖像效果)

    圖像效果提供處理圖像的一些基礎(chǔ)能力,包括對當(dāng)前圖像的亮度調(diào)節(jié)、模糊化、灰度調(diào)節(jié)、智能取色等。 該模塊提供以下圖像效果相關(guān)的常用功能: Filter:效果類,用于添加指定效果到
    的頭像 發(fā)表于 02-22 16:08 ?343次閱讀
    <b class='flag-5'>鴻蒙</b><b class='flag-5'>開發(fā)</b><b class='flag-5'>圖形圖像</b>——@ohos.effectKit (<b class='flag-5'>圖像</b>效果)

    鴻蒙OS元服務(wù)開發(fā)說明:【WebGL網(wǎng)頁圖形開發(fā)接口

    WebGL主要幫助開發(fā)者在前端開發(fā)中完成圖形圖像的相關(guān)處理,比如繪制彩色圖形等。目前該功能僅支持使用兼容JS的類Web
    的頭像 發(fā)表于 04-02 17:02 ?424次閱讀
    <b class='flag-5'>鴻蒙</b>OS元服務(wù)<b class='flag-5'>開發(fā)</b>說明:【<b class='flag-5'>WebGL</b>網(wǎng)頁<b class='flag-5'>圖形</b>庫<b class='flag-5'>開發(fā)</b><b class='flag-5'>接口</b>】

    鴻蒙OS元服務(wù)開發(fā):【WebGL網(wǎng)頁圖形開發(fā)概述】

    WebGL的全稱為Web Graphic Library(網(wǎng)頁圖形庫),主要用于交互式渲染2D圖形和3D圖形。目前HarmonyOS中使用的WebG
    的頭像 發(fā)表于 04-02 17:26 ?387次閱讀
    <b class='flag-5'>鴻蒙</b>OS元服務(wù)<b class='flag-5'>開發(fā)</b>:【<b class='flag-5'>WebGL</b>網(wǎng)頁<b class='flag-5'>圖形</b>庫<b class='flag-5'>開發(fā)</b>概述】

    鴻蒙開發(fā)接口圖形圖像:【WebGL2】

    WebGL2支持圖形的繪制,包括對當(dāng)前繪制圖形的位置、顏色等進行處理,其中相對WebGL來說對渲染管道和著色語言進行了增強。
    的頭像 發(fā)表于 05-30 15:19 ?482次閱讀
    <b class='flag-5'>鴻蒙</b><b class='flag-5'>開發(fā)</b><b class='flag-5'>接口</b><b class='flag-5'>圖形圖像</b>:【<b class='flag-5'>WebGL</b>2】