[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] Sharing Resources across contexts



On Tuesday, February 12, 2013, Kirill Prazdnikov wrote:

Hi Gregg,

void cancelAcquireSharedResource(long id);

The purpose of cancelAcquireSharedResource is not clear from the document.

acquireSharedResource is an asynchronous operation. cancleAcquireSharedResource would indicate that a previous acquire call, presumably one that has not yet completed, is no longer desired. It should function like clearTimeout for a setTimeout call.

One thing that's not explicitly mentioned in the wiki is the behavior of cancelAcquireSharedResource if the acquisition has already succeeded. I would imagine it's a no-op at that point?
 

Why simply not to use COM like ref counting ?
  acquireSharedResource = addRef
  releaseSharedResources = release ?

Thanks

The effect of these functions is different than addRef/release. Acquiring a WebGL resource would allow the acquiring context access to the resource, and may prevent other contexts from accessing it if it was acquired with gl.EXCLUSIVE. If acquired exclusively, other contexts would not be able to acquire or access the resources until it had been released. This is to maintain safety across threads and to explicitly manage the requirements of OpenGL regarding use by multiple contexts. As such ref counting is not a good parallel. 

--Brandon



On 2/12/2013 2:43 AM, Gregg Tavares wrote:
Sharing resources across contexts is still a very important feature so here's a proposal

http://www.khronos.org/webgl/wiki/SharedResouces

Looking forward to your feedback

Note: This is an orthogonal issue to the 1 context multiple canvases issue. It is also orthogonal to the drawing from a worker into a canvas issue.




-----------------------------------------------------------
You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email:
unsubscribe public_webgl
-----------------------------------------------------------