Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I want to try out WebGL as I'm learning OpenGL currently and, well yeah, kind of interested in how WebGL looks like.

I tried some demo sites like this or that. But unfortunately they don't work. I get the warning both in firefox and chromium:

This page requires a browser that supports WebGL.

Browsing to the official WebGL homepage tells me the following:

Hmm. While your browser seems to support WebGL, it is disabled or unavailable. If possible, please ensure that you are running the latest drivers for your video card.

I've found this answer on AskUbuntu, but enabling the software rendering list override does not enable WebGL for me in chromium.

I'm running Sabayon Linux x86_64 with an NVIDIA GPU:

 ~ # uname -a
Linux qdoe 3.9.0-sabayon #1 SMP Thu Jun 27 07:53:45 UTC 2013 x86_64 Intel(R) Core(TM) i7-3930K CPU @ 3.20GHz GenuineIntel GNU/Linux
~ # lspci | grep VGA
02:00.0 VGA compatible controller: NVIDIA Corporation GK107 [GeForce GT 640] (rev a1)
 ~ # firefox -v
Mozilla Firefox 20.0.1
 ~ # chromium --version
Chromium 27.0.1453.110

Using following drivers:

 ~ # equo search x11-drivers/nvidia-drivers-319.32#3.9.0-sabayon
>> @@ Package: x11-drivers/nvidia-drivers-319.32#3.9.0-sabayon branch: 5, [sabayon-limbo] 
>>   Available:     version: 319.32 ~ tag: 3.9.0-sabayon ~ revision: 0
>>   Installed:     version: 319.32 ~ tag: 3.9.0-sabayon ~ revision: 0
>>   Slot:          0,3.9.0-sabayon
>>   Homepage:      http://www.nvidia.com/ 
>>   Description:   NVIDIA GPUs kernel drivers 
>>   License:       NVIDIA-r1
 ~ # lsmod | grep nvidia
nvidia               9376114  23 

Any ideas how to enable WebGL in either Chrome or Firefox?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

Well, according to the WebGL public wiki, both firefox and chrome support WebGL with Nvidia GPUs in X11/Linux.

In my case the wrong graphic driver was selected.

 ~ # eselect opengl list
Available OpenGL implementations:
  [1]   nvidia
  [2]   xorg-x11 *

Setting it back to nvidia fixed my issues with WebGL.

 ~ # eselect opengl set nvidia
Switching to nvidia OpenGL interface... done
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.