[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/11 12:10, Gregg Tavares (社用) wrote:

This won't work for us. The problem we were trying to solve was being able to
use 1 context to render to multiple canvases. Each canvas is a different size.
The typical application that needs this is a 3D editor with multiple 3D views
each sizes by the user.

The reason we need 1 context to be able to write to all of those canvases
is because sharing GL resources brings with it a huge amount of state
issues. The solution was just being able to use the same context on mulitple
That is not a very good example. It is easily accomplished by changing the viewport on a single canvas. The only reason to use separate canvases would be if you wanted to separate the views and put other stuff between them. However I don't think that would be a very satisfactory UI experience.

But that means each canvas has its own backingstore as each canvas
is a different size. We can't use a solution where the backing store is 
part of context, not the canvas.

You could use a single backing store the size of the larger canvas. You can reuse the auxiliary buffers in the same way.



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

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.