Dear All,
I have a question, When a glcontext is lost and again restored , what should be 
the behaviour of associated extensions ?
I have a test case  
http://www.khronos.org/registry/webgl/sdk/tests/conformance/context/context-lost-restored.html,
and in it I am confused to see  that upon context restoration , test case 
expects extension 's related API's to be NULL .

here is the  js code snippet from above mentioned link:


function testOESVertexArrayObject() {
  if (OES_vertex_array_object) {
    // Extension must still be lost.
    shouldBeNull("OES_vertex_array_object.createVertexArrayOES()");  // WHY ????
    // Try re-enabling extension

    old_OES_vertex_array_object = OES_vertex_array_object;
    OES_vertex_array_object = reGetExtensionAndTestForProperty(gl, 
"OES_vertex_array_object", false);
    shouldBeTrue("OES_vertex_array_object.createVertexArrayOES() != null");
    shouldBeTrue("old_OES_vertex_array_object.createVertexArrayOES() == null");
  }
}

function testExtensions() {
  testOESTextureFloat();
  testOESVertexArrayObject();
  // Only the WEBGL_lose_context extension should be the same object after 
context lost.
  new_WEBGL_lose_context = reGetExtensionAndTestForProperty(gl, 
"WEBGL_lose_context", true);
}


///  this function is a callback function , which is attached to 
addeventlistener in above mention link//

function testRestoredContext()
{
    debug("Test restored context");
    shouldBeFalse("contextRestoredEventFired");
    contextRestoredEventFired = true;
    shouldBeFalse("gl.isContextLost()");
    shouldBe("gl.getError()", "gl.NO_ERROR");

    // Validate that using old resources fails.
    testResources(gl.INVALID_OPERATION);

    testRendering();

    // Validate new resources created in testRendering().
    testResources(gl.NO_ERROR);

    testExtensions();

    debug("");
}

Our Webkit Nightly Build  fails 
    shouldBeNull("OES_vertex_array_object.createVertexArrayOES()")which it 
should fail , however khronous test case suite expects it to PASS , adn i 
tested this on chrome on windows, that passes :(


Kindly put some light here..
regards
rsadhu


regards
RSadhu                                    
_______________________________________________
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev

Reply via email to