[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Public WebGL] Web Workers and ArrayBuffers?
- To: webgl public <public_webgl@khronos.org>
- Subject: [Public WebGL] Web Workers and ArrayBuffers?
- From: Shy Shalom <shooshx@gmail.com>
- Date: Tue, 12 Apr 2011 14:41:55 +0300
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:from:date:message-id:subject:to :content-type; bh=ygFirtWH/GwMZebsa2wvX1QQwyoyWy2xgB2/rEgUuxg=; b=ThJdp8Qbz3LeqdOWdjo3CISs4x/R0ePxC+XpNzrXqBxHCwW5dDpl3jndofdED0TxX3 57P5FoyD8DCH9vLOuLBLHS36xLDLN3fcCdNikGS1vHwXcxiuig3yz6eEhsYdtiL+1cX5 eRyqpXWWHy9LEkE313+VqPaPE/nV3VZaosDNw=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=LKcJCdutXb9yMTiqwZ2Zu3oaZ9DXBsmX01gZDqmB4hS0M32kHvaCEMZ889BAX82/uf JMMMEHDdC9EH5wTJkd5I1QdGAagMWUF/60ZQIOSGbxWZXkXjGkL9BMLElVCHTN8frpBz 2wfFz3PGVbpfodcNNUc8epLx2K8KQOfSUxkCE=
- List-id: Public WebGL Mailing List <public_webgl.khronos.org>
- Sender: owner-public_webgl@khronos.org
I'm trying to write a Worker thread that does some processing and creates a mesh on the fly.
It works fine up until returning the created result to the main GUI thread.
it seems that the communication between the worker and the main thread does JSON serialization,
so if I'm sending a Float32Array from the worker, what I get in the main thread is a regular _javascript_ array.
A trivial solution is to just rebuild the Float32Array again from the array I receive but that seems wasteful.
Is there a good workaround for this? Maybe a way to tell the JSON deserialization that something should be a Float32Array ?