why my Guest os cannot play webgl content?

Discussions related to using VirtualBox on Linux hosts.
Post Reply
MounTainLion
Posts: 12
Joined: 20. May 2014, 09:39

why my Guest os cannot play webgl content?

Post by MounTainLion »

i'm using windows 8.1 on my ubuntu 14.04

i want to benchmark my guest machine and ran webgl content on my chrome browser.
but this benchmark doesnt work since my browser doesnt support webgl.

it seems virtualbox driver doesn't support webgl feature.
is there any way to enable webgl feature on my guest machine?
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: just about all that run

Re: why my Guest os cannot play webgl content?

Post by loukingjr »

Not sure what you mean. results from IE11, Windows 8.1 guest. VideoBox driver works for me.

Code: Select all

userAgent = Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; .NET4.0E; .NET4.0C; Tablet PC 2.0; rv:11.0) like Gecko
GL_VERSION = WebGL 0.94
GL_VENDOR = Microsoft
GL_RENDERER = Internet Explorer
GL_SHADING_LANGUAGE_VERSION = WebGL GLSL ES 0.94
+------------------------------------------+--------------+
| metric                                   | value        |
+------------------------------------------+--------------+
| vtf/l1.dim128.strip.tps                  |       677291 |
| vtf/l1.dim128.strip.dps                  |           21 |
| uniqtex/l4.dim32.strip.tps               |      2312876 |
| uniqtex/l4.dim32.strip.dps               |         1203 |
| uniqtex/l4.dim64.strip.tps               |      1672919 |
| uniqtex/l4.dim64.strip.dps               |          211 |
| caps/ALIASED_LINE_WIDTH_RANGE0           |            1 |
| caps/ALIASED_LINE_WIDTH_RANGE1           |            1 |
| caps/ALIASED_POINT_SIZE_RANGE0           |            1 |
| caps/ALIASED_POINT_SIZE_RANGE1           |          640 |
| caps/ALPHA_BITS                          |            8 |
| caps/BLUE_BITS                           |            8 |
| caps/GREEN_BITS                          |            8 |
| caps/MAX_COMBINED_TEXTURE_IMAGE_UNITS    |           32 |
| caps/MAX_CUBE_MAP_TEXTURE_SIZE           |        16384 |
| caps/MAX_FRAGMENT_UNIFORM_VECTORS        |          512 |
| caps/MAX_RENDERBUFFER_SIZE               |        16384 |
| caps/MAX_TEXTURE_IMAGE_UNITS             |           16 |
| caps/MAX_TEXTURE_SIZE                    |        16384 |
| caps/MAX_VARYING_VECTORS                 |           15 |
| caps/MAX_VERTEX_ATTRIBS                  |           16 |
| caps/MAX_VERTEX_TEXTURE_IMAGE_UNITS      |           16 |
| caps/MAX_VERTEX_UNIFORM_VECTORS          |          512 |
| caps/MAX_VIEWPORT_DIMS0                  |        16384 |
| caps/MAX_VIEWPORT_DIMS1                  |        16384 |
| caps/RED_BITS                            |            8 |
| caps/SAMPLE_BUFFERS                      |            1 |
| caps/SAMPLES                             |            2 |
| caps/STENCIL_BITS                        |            0 |
| caps/SUBPIXEL_BITS                       |            4 |
+------------------------------------------+--------------+
Google Chrome

Code: Select all

userAgent = Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.118 Safari/537.36
GL_VERSION = WebGL 1.0 (OpenGL ES 2.0 Chromium)
GL_VENDOR = WebKit
GL_RENDERER = WebKit WebGL
GL_SHADING_LANGUAGE_VERSION = WebGL GLSL ES 1.0 (OpenGL ES GLSL ES 1.0 Chromium)
+------------------------------------------+--------------+
| metric                                   | value        |
+------------------------------------------+--------------+
| vtf/l1.dim128.strip.tps                  |      4471583 |
| vtf/l1.dim128.strip.dps                  |          139 |
| uniqtex/l4.dim32.strip.tps               |      5386268 |
| uniqtex/l4.dim32.strip.dps               |         2802 |
| uniqtex/l4.dim64.strip.tps               |      7360223 |
| uniqtex/l4.dim64.strip.dps               |          927 |
| caps/ALIASED_LINE_WIDTH_RANGE0           |            1 |
| caps/ALIASED_LINE_WIDTH_RANGE1           |            1 |
| caps/ALIASED_POINT_SIZE_RANGE0           |        0.125 |
| caps/ALIASED_POINT_SIZE_RANGE1           |         8192 |
| caps/ALPHA_BITS                          |            8 |
| caps/BLUE_BITS                           |            8 |
| caps/GREEN_BITS                          |            8 |
| caps/MAX_COMBINED_TEXTURE_IMAGE_UNITS    |           20 |
| caps/MAX_CUBE_MAP_TEXTURE_SIZE           |         8192 |
| caps/MAX_FRAGMENT_UNIFORM_VECTORS        |          221 |
| caps/MAX_RENDERBUFFER_SIZE               |         4096 |
| caps/MAX_TEXTURE_IMAGE_UNITS             |           16 |
| caps/MAX_TEXTURE_SIZE                    |         8192 |
| caps/MAX_VARYING_VECTORS                 |           10 |
| caps/MAX_VERTEX_ATTRIBS                  |           16 |
| caps/MAX_VERTEX_TEXTURE_IMAGE_UNITS      |            4 |
| caps/MAX_VERTEX_UNIFORM_VECTORS          |          253 |
| caps/MAX_VIEWPORT_DIMS0                  |         4096 |
| caps/MAX_VIEWPORT_DIMS1                  |         4096 |
| caps/RED_BITS                            |            8 |
| caps/SAMPLE_BUFFERS                      |            0 |
| caps/SAMPLES                             |            0 |
| caps/STENCIL_BITS                        |            0 |
| caps/SUBPIXEL_BITS                       |            4 |
+------------------------------------------+--------------+
Not all WebGL content will play. Depends on the version of OpenGL. Also I couldn't get Firefox to play WebGL content.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
MounTainLion
Posts: 12
Joined: 20. May 2014, 09:39

Re: why my Guest os cannot play webgl content?

Post by MounTainLion »

oh i mean, webgl support using h/w acceleration

currently, guest machine runs webgl contents with s/w renderging, it is very slow and consumes cpu resources
which is not very efficient and effective.

but i want my gpu plays webgl contents.
Last edited by MounTainLion on 7. Apr 2015, 15:27, edited 1 time in total.
MounTainLion
Posts: 12
Joined: 20. May 2014, 09:39

Re: why my Guest os cannot play webgl content?

Post by MounTainLion »

oh i mean, webgl support using h/w acceleration

currently, guest machine runs webgl contents with s/w renderging, it is very slow and consumes cpu resources
which is not very efficient and effective.

but i want my gpu plays webgl contents.
loukingjr wrote:Not sure what you mean. results from IE11, Windows 8.1 guest. VideoBox driver works for me.

Code: Select all

userAgent = Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; .NET4.0E; .NET4.0C; Tablet PC 2.0; rv:11.0) like Gecko
GL_VERSION = WebGL 0.94
GL_VENDOR = Microsoft
GL_RENDERER = Internet Explorer
GL_SHADING_LANGUAGE_VERSION = WebGL GLSL ES 0.94
+------------------------------------------+--------------+
| metric                                   | value        |
+------------------------------------------+--------------+
| vtf/l1.dim128.strip.tps                  |       677291 |
| vtf/l1.dim128.strip.dps                  |           21 |
| uniqtex/l4.dim32.strip.tps               |      2312876 |
| uniqtex/l4.dim32.strip.dps               |         1203 |
| uniqtex/l4.dim64.strip.tps               |      1672919 |
| uniqtex/l4.dim64.strip.dps               |          211 |
| caps/ALIASED_LINE_WIDTH_RANGE0           |            1 |
| caps/ALIASED_LINE_WIDTH_RANGE1           |            1 |
| caps/ALIASED_POINT_SIZE_RANGE0           |            1 |
| caps/ALIASED_POINT_SIZE_RANGE1           |          640 |
| caps/ALPHA_BITS                          |            8 |
| caps/BLUE_BITS                           |            8 |
| caps/GREEN_BITS                          |            8 |
| caps/MAX_COMBINED_TEXTURE_IMAGE_UNITS    |           32 |
| caps/MAX_CUBE_MAP_TEXTURE_SIZE           |        16384 |
| caps/MAX_FRAGMENT_UNIFORM_VECTORS        |          512 |
| caps/MAX_RENDERBUFFER_SIZE               |        16384 |
| caps/MAX_TEXTURE_IMAGE_UNITS             |           16 |
| caps/MAX_TEXTURE_SIZE                    |        16384 |
| caps/MAX_VARYING_VECTORS                 |           15 |
| caps/MAX_VERTEX_ATTRIBS                  |           16 |
| caps/MAX_VERTEX_TEXTURE_IMAGE_UNITS      |           16 |
| caps/MAX_VERTEX_UNIFORM_VECTORS          |          512 |
| caps/MAX_VIEWPORT_DIMS0                  |        16384 |
| caps/MAX_VIEWPORT_DIMS1                  |        16384 |
| caps/RED_BITS                            |            8 |
| caps/SAMPLE_BUFFERS                      |            1 |
| caps/SAMPLES                             |            2 |
| caps/STENCIL_BITS                        |            0 |
| caps/SUBPIXEL_BITS                       |            4 |
+------------------------------------------+--------------+
Google Chrome

Code: Select all

userAgent = Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.118 Safari/537.36
GL_VERSION = WebGL 1.0 (OpenGL ES 2.0 Chromium)
GL_VENDOR = WebKit
GL_RENDERER = WebKit WebGL
GL_SHADING_LANGUAGE_VERSION = WebGL GLSL ES 1.0 (OpenGL ES GLSL ES 1.0 Chromium)
+------------------------------------------+--------------+
| metric                                   | value        |
+------------------------------------------+--------------+
| vtf/l1.dim128.strip.tps                  |      4471583 |
| vtf/l1.dim128.strip.dps                  |          139 |
| uniqtex/l4.dim32.strip.tps               |      5386268 |
| uniqtex/l4.dim32.strip.dps               |         2802 |
| uniqtex/l4.dim64.strip.tps               |      7360223 |
| uniqtex/l4.dim64.strip.dps               |          927 |
| caps/ALIASED_LINE_WIDTH_RANGE0           |            1 |
| caps/ALIASED_LINE_WIDTH_RANGE1           |            1 |
| caps/ALIASED_POINT_SIZE_RANGE0           |        0.125 |
| caps/ALIASED_POINT_SIZE_RANGE1           |         8192 |
| caps/ALPHA_BITS                          |            8 |
| caps/BLUE_BITS                           |            8 |
| caps/GREEN_BITS                          |            8 |
| caps/MAX_COMBINED_TEXTURE_IMAGE_UNITS    |           20 |
| caps/MAX_CUBE_MAP_TEXTURE_SIZE           |         8192 |
| caps/MAX_FRAGMENT_UNIFORM_VECTORS        |          221 |
| caps/MAX_RENDERBUFFER_SIZE               |         4096 |
| caps/MAX_TEXTURE_IMAGE_UNITS             |           16 |
| caps/MAX_TEXTURE_SIZE                    |         8192 |
| caps/MAX_VARYING_VECTORS                 |           10 |
| caps/MAX_VERTEX_ATTRIBS                  |           16 |
| caps/MAX_VERTEX_TEXTURE_IMAGE_UNITS      |            4 |
| caps/MAX_VERTEX_UNIFORM_VECTORS          |          253 |
| caps/MAX_VIEWPORT_DIMS0                  |         4096 |
| caps/MAX_VIEWPORT_DIMS1                  |         4096 |
| caps/RED_BITS                            |            8 |
| caps/SAMPLE_BUFFERS                      |            0 |
| caps/SAMPLES                             |            0 |
| caps/STENCIL_BITS                        |            0 |
| caps/SUBPIXEL_BITS                       |            4 |
+------------------------------------------+--------------+
Not all WebGL content will play. Depends on the version of OpenGL. Also I couldn't get Firefox to play WebGL content.
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: just about all that run

Re: why my Guest os cannot play webgl content?

Post by loukingjr »

Well of course you need VT-x enabled and the guest additions installed to enable 3D acceleration.

you can't use your GPU in a virtual machine.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
MounTainLion
Posts: 12
Joined: 20. May 2014, 09:39

Re: why my Guest os cannot play webgl content?

Post by MounTainLion »

But.....
By using guest addition, VM can use hw acceleration(handle directx or opengl api)
why not webgl??
loukingjr wrote:Well of course you need VT-x enabled and the guest additions installed to enable 3D acceleration.

you can't use your GPU in a virtual machine.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: why my Guest os cannot play webgl content?

Post by mpack »

webgl is a browser API, not a PC technology. Browsers which implement it will call down to an underlying OpenGL or DirectX API in the OS.
Technologov
Volunteer
Posts: 3342
Joined: 10. May 2007, 16:59
Location: Israel

Re: why my Guest os cannot play webgl content?

Post by Technologov »

AFAIK WebGL requires more advanced OpenGL 3.x technology.

VirtualBox only supports OpenGL 2.1 in guest OSes. So even if host OS supports OpenGL 4, guest will only "see" OpenGL 2.1.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: why my Guest os cannot play webgl content?

Post by mpack »

I doubt that is a requirement - I imagine one could implement the browser api over a DirectX underlying layer - but it's probably true in practice.
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: just about all that run

Re: why my Guest os cannot play webgl content?

Post by loukingjr »

FWIW, I've played some WebGL content in some guests. Sometimes only in Google Chrome, some also in Firefox. I also had a WebGL demo crash Firefox running in a Linux host although it would play others. WebGL results are very inconsistent.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
Post Reply