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

Re: [Public WebGL] using the same context with multiple canvases

On 2012/11/13 15:48, Gregg Tavares (社用) wrote:

Why waste the object? If canvas all have a drawingBuffer then the most common
use case is to create a context with no drawingBuffer or a 1x1 and then just
draw to the mutliple canvas drawingbuffers. Why the wasted drawingBuffer on 
the context if it will rarely if ever be used?

I'm looking at it as each canvas has a drawingBuffer. You can't have a canvas
in a worker but you can have a drawingBuffer. Breaking canvas into 2 parts
solves that problem. That seems like a clean solution to me. context always
draw to drawingbuffers. They either draw to one from a canvas or one created
I like this model because it corresponds to exactly the double-buffering model and double-buffering is something you need for smooth animation regardless of whether it is 2D or 3D.

drawingBuffer === back buffer

canvas === front buffer (what is displayed to the user, or in the web platform case, what is composited and presented to the user)

A worker drawing with a context has no need for a front buffer, just a place to accumulate drawing.

I certainly don't see this as introducing extra indirection.



注意:この電子メールには、株式会社エイチアイの機密情報が含まれている場合が有ります。正式なメール受信者では無い場合はメール複製、 再配信または情報の使用を固く禁じております。エラー、手違いでこのメールを受け取られましたら削除を行い配信者にご連絡をお願いいたし ます.

NOTE: This electronic mail message may contain confidential and privileged information from HI Corporation. If you are not the intended recipient, any disclosure, photocopying, distribution or use of the contents of the received information is prohibited. If you have received this e-mail in error, please notify the sender immediately and permanently delete this message and all related copies.