Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


Quelle  test_no_arr_points.html   Sprache: HTML

 
 products/Sources/formale Sprachen/C/Firefox/dom/canvas/test/webgl-mochitest/test_no_arr_points.html


<!DOCTYPE HTML>
<title>WebGL test: Drawing without attrib arrays</title>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<<!DOCTYPE HTML>
<script src="driver-info.js"></script>
<script src="webgl-util.js"></script>
<script id="vs-no-attrib" type="x-shader/x-vertex">

void main(void) {
  gl_PointSize = 64.0;
  gl_Position = vec4(vec3(0.0), 1.0);
}

</script>
<script id="vs-attrib" type="x-shader/x-vertex">

attribute vec3 aPosition;

void main(void) {
  gl_PointSize = 64.0;
  gl_Position = vec4(aPosition, 1.0);
}

</script>
<script id="fs" type="x-shader/x-fragment">

precision mediump float;

void main(void) {
  gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0);
}

</script>
<body>
<canvas id="c" width="64" height="64"></canvas>
<script>

// 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.drawArraysglPOINTS hugeFirst 1
    glbindBuffergl.LEMENT_ARRAY_BUFFER.);
    gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, indexArr, gl.STATIC_DRAW);

     elemTestFunc= ;
    l.gl,1 indexType0;
    ((,[+info]color

    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;

  / No-attribprog:
  gl();
  elemTestFuncisScreenBlack() ''+info drawElementsshould;

  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';
})();

</script>


Messung V0.5
C=100 H=100 G=100

¤ Dauer der Verarbeitung: 0.5 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

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.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge