var aa = document.createElement('canvas'); ab = aa.getContext('webgl'); debugger; var ac = { 'contextName': ab.getParameter(ab['VERSION']), 'glVersion': ab.getParameter(ab['VERSION']), 'shadingLanguageVersion': ab.getParameter(ab['SHADING_LANGUAGE_VERSION']), 'vendor': ab.getParameter(ab['VENDOR']), 'renderer': ab.getParameter(ab['RENDERER']), 'unmaskedVendor': null, 'unmaskedRenderer': null, 'antialias': ab.getContextAttributes()['antialias'], 'extensions': ab.getSupportedExtensions(), 'maxTextureSize': ab.getParameter(ab['MAX_TEXTURE_SIZE']), 'maxViewportDims': ab.getParameter(ab['MAX_VIEWPORT_DIMS']), 'maxCubeMapTextureSize': ab.getParameter(ab['MAX_CUBE_MAP_TEXTURE_SIZE']), 'maxRenderbufferSize': ab.getParameter(ab['MAX_RENDERBUFFER_SIZE']), 'maxVaryingVectors': ab.getParameter(ab['MAX_VARYING_VECTORS']), 'maxVertexAttribs': ab.getParameter(ab['MAX_VERTEX_ATTRIBS']), 'maxVertexTextureImageUnits': ab.getParameter(ab['MAX_VERTEX_TEXTURE_IMAGE_UNITS']), 'maxVertexUniformVectors': ab.getParameter(ab['MAX_VERTEX_UNIFORM_VECTORS']), 'aliasedLineWidthRange': ab.getParameter(ab['ALIASED_LINE_WIDTH_RANGE']), 'aliasedPointSizeRange': ab.getParameter(ab['ALIASED_POINT_SIZE_RANGE']), 'maxFragmentUniformVectors': ab.getParameter(ab['MAX_FRAGMENT_UNIFORM_VECTORS']) }; ad = ab.getExtension('WEBGL_debug_renderer_info'); ac['unmaskedVendor'] = ab.getParameter(ad['UNMASKED_VENDOR_WEBGL']); ac['unmaskedRenderer'] = ab.getParameter(ad['UNMASKED_RENDERER_WEBGL']); let t_j = JSON.stringify(ac); console.log(t_j); debugger;
标签:canvas,ab,MAX,webgl,ac,getParameter,WEBGL,SIZE From: https://www.cnblogs.com/angdh/p/18320577