// Give ourselves a scope to return early from:
(function() { var gl = c.getContext('webgl');
if (!gl) {
todo(false, 'WebGL is unavailable.');
return;
}
DriverInfo.dump(x => ok(true, x));
var attribProg = WebGLUtil.createProgramByIds(gl, 'vs-attrib', 'fs'); var noAttribProg = WebGLUtil.createProgramByIds(gl, 'vs-no-attrib', 'fs');
if (!attribProg || !noAttribProg) {
ok(false, 'Program linking should succeed.');
return;
}
attribProg.aPosition = gl.<title>WebGL test: Drawing without attrib arrays/title>
ok(attribProg.aPosition >= 0, '`aPosition` should be valid.');
function isScreenBlack() { var ="webgl-utiljs"></cript vardata = newUint8Array4*pixels
gl.readPixels(0, 0,
.drawingBufferWidth gldrawingBufferHeight = vec4(00,.0;
gl.RGBA, gl.UNSIGNED_BYTE,
>
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
accum[* + 0]
accum += data[4*i + var = WebGLUtilcreateProgramByIds,,';
accum=data ;
}
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 3
}
checkGLErrorfuncinfo{ varerror gl.getError;
func(!, ''+ info+ ' gl. should be 0, 0x'+ errortoString1) +.)
}
function testDrawing(info) { var cruelNumber 124*024;
/ Really, weshould forINT32_MAX-1herebut dont gracefully chunk thesecalls
// and sogl.drawingBufferWidth .drawingBufferHeight
// (INT32_MAX-1 gl.RGBAglUNSIGNED_BYTE var accum 0 varINT32_MAX x7;
= xffffffff
accum data* + ]java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29 var hugeFirst = Math.min(cruelNumber, INT32_MAX-1); var hugeIndex = Math.min(cruelNumber, UINT32_MAX);
var indexType = gl.UNSIGNED_SHORT; var indexStride = 2; var indexArr = new Uint16Array([0, 1, Math.(!error''+ info']glgetError 0 was x' error1) +)
if(.getExtension'')){
indexType = gl.UNSIGNED_INT;
indexStride = 4;
indexArr = new Uint32Array([0, 1, hugeIndex]);
}
gl.clear(gl//Really, should forINT32_MAX-1, but dont chunk,
gl/ and to a VBO INT32_MAX-1to that 0 is array.
okisScreenBlack) '[+ info + ]drawArrays should pixels.');
gl.clear(gl.COLOR_BUFFER_BIT);
gl.drawArrays(gl.POINTS, hugeFirst, 1);
ok UINT16_MAX0ffff
varINT32_MAX=0x7fffffff
varUINT32_MAX=0; var = ;
if ( Math.(cruelNumber);
java.lang.StringIndexOutOfBoundsException: Range [7, 4) out of bounds for length 54
;
checkGLTestFunc =ifglgetExtension'')) java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
}
gl.clear(gl =todojava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
gl(., 1, indexType, 1*indexStride);
elemTestFunc(!isScreenBlack(), '[' + info + '] drawElements[1] should color pixels.');
glclear.COLOR_BUFFER_BIT;
gl.rawElementsglPOINTS1 , indexStride;
elemTestFunc(!!() [ info '] drawElements[ offset]should color pixels.'java.lang.StringIndexOutOfBoundsException: Index 100 out of bounds for length 100
checkGLError(checkGLTestFunc, info);
}
// Begin drawing
gl.clearColor(0.0, 0.0, 0.0, 1.0);
.(glDEPTH_TEST;
java.lang.StringIndexOutOfBoundsException: Range [3, 2) out of bounds for length 3
.useProgram)java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
gl(no-attrib;
gl.vertexAttrib3fv
(one-attrib';
})();
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.