Multiple Windows

34 views
Skip to first unread message

Gregg Tavares

unread,
Apr 24, 2013, 9:59:56 PM4/24/13
to webgl-d...@googlegroups.com
I spent last night throwing together a multiple windows WebGL demo




Click on "Click for New Window" to make new windows with views of the same scene. Drag the controls to see the scene get updated in all windows.

it's not meant to be a usable library, mostly just a sample.

It works by making an offscreen WebGL canvas and one 2d canvas per window (including the main window). To render a particular window it sets the viewport to match the window's size, renders the scene to the offscreen canvas, then calls ctx.drawImage to 'blit' the scene into the specific window.

I suspect it runs too slow on Windows, something the browser implementors might want to look into.

On the other hand I was hoping to show that if you want to create a 3d modeler with multiple windows there are ways to do it.

Kenneth Russell

unread,
Apr 25, 2013, 1:44:49 PM4/25/13
to webgl-d...@googlegroups.com
Cool. Nice example.
> --
> You received this message because you are subscribed to the Google Groups
> "WebGL Dev List" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to webgl-dev-lis...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Michel Braz de Morais

unread,
Apr 25, 2013, 5:35:38 PM4/25/13
to webgl-d...@googlegroups.com
Nice example but very very slow.
My Pc Firefox windows.



att,

Michel Braz de Morais

Analista / Desenvolvedor de sistemas


2013/4/25 Kenneth Russell <k...@chromium.org>

Gregg Tavares

unread,
Apr 25, 2013, 7:51:24 PM4/25/13
to webgl-d...@googlegroups.com
Yes, Like I mentioned it runs reasonably fast on OSX and Linux. We'll need to figure out why it's slow on windows.

Mark Callow

unread,
Apr 30, 2013, 11:30:58 PM4/30/13
to webgl-d...@googlegroups.com, Gregg Tavares

On 13/04/26 8:51, Gregg Tavares wrote:
Yes, Like I mentioned it runs reasonably fast on OSX and Linux. We'll need to figure out why it's slow on windows.


I think we have noted before that glReadPixels in ANGLE on D3D is slow. Presumably there is a glReadPixels happening during the ctx.drawImage call.

Regards

    -Mark

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

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.

Gregg Tavares

unread,
May 1, 2013, 12:16:58 AM5/1/13
to Mark Callow, webgl-d...@googlegroups.com
On Tue, Apr 30, 2013 at 8:30 PM, Mark Callow <callo...@artspark.co.jp> wrote:

On 13/04/26 8:51, Gregg Tavares wrote:
Yes, Like I mentioned it runs reasonably fast on OSX and Linux. We'll need to figure out why it's slow on windows.


I think we have noted before that glReadPixels in ANGLE on D3D is slow. Presumably there is a glReadPixels happening during the ctx.drawImage call.

It's possible but ideally there should be no need to call glReadPixels so there's room for optimization 
Reply all
Reply to author
Forward
0 new messages