Author Topic: WebGL Browser support  (Read 5890 times)

0 Members and 1 Guest are viewing this topic.

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
WebGL Browser support
« on: November 09, 2012, 09:24:51 pm »
Hey, I wanted to start and so some awesome stuff with WebGL but it looks as if my browser doesn't support it.
I have Chromium, this version: Version 22.0.1229.94 (161065) and i'm running on archlinux
my html code looks like this (from a tutorial to test if it's working):
Code: [Select]
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
function initWebGL(canvas) {
// Initialize the global variable gl to null.
gl = null;

try {
// Try to grab the standard context. If it fails, fallback to experimental.
gl = canvas.getContext("webgl") || canvas.getContext("experimental-webgl");
}
catch(e) {}

// If we don't have a GL context, give up now
if (!gl) {
alert("Unable to initialize WebGL. Your browser may not support it.");
}
}
function doFirst() {
var canvas = document.getElementById("canvas");

initWebGL(canvas);      // Initialize the GL context

// Only continue if WebGL is available and working

if (gl) {
gl.clearColor(0.0, 0.0, 0.0, 1.0);                      // Set clear color to black, fully opaque
gl.enable(gl.DEPTH_TEST);                               // Enable depth testing
gl.depthFunc(gl.LEQUAL);                                // Near things obscure far things
gl.clear(gl.COLOR_BUFFER_BIT|gl.DEPTH_BUFFER_BIT);      // Clear the color as well as the depth buffer.
}
}
window.addEventListener('load',doFirst,false);
</script>
</head>
<body onload="start()">
<canvas id="canvas" width="640" height="480">
Internet explorer SUCKS! :P
</canvas>
</body>
</html>

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: WebGL Browser support
« Reply #1 on: November 09, 2012, 09:32:40 pm »
Does it pop up with the error message? It works fine for me in Chrome (beta channel).

Chrome should support WebGL since version 9.
« Last Edit: November 09, 2012, 09:32:55 pm by Deep Thought »




Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: WebGL Browser support
« Reply #2 on: November 09, 2012, 09:36:37 pm »
yeah, the error message popus up

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: WebGL Browser support
« Reply #3 on: November 09, 2012, 09:39:45 pm »
Maybe the Linux build of Chrome doesn't support WebGL? Though I can't see a reason why not.

EDIT: Is WebGL disabled in chrome://flags/?
« Last Edit: November 09, 2012, 09:40:41 pm by Deep Thought »




Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: WebGL Browser support
« Reply #4 on: November 09, 2012, 09:41:48 pm »
it was deactivated, activated and thought woot, but that popup is still coming -.-

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: WebGL Browser support
« Reply #5 on: November 09, 2012, 09:52:49 pm »
You un-checked the checkbox, right?

And did you restart Chrome afterwards?




Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: WebGL Browser support
« Reply #6 on: November 09, 2012, 11:50:54 pm »
Do you have 3D graphics acceleration?

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: WebGL Browser support
« Reply #7 on: November 10, 2012, 02:30:09 am »
@dt yes
and @willrandship: how do i find out?

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: WebGL Browser support
« Reply #8 on: November 10, 2012, 02:32:04 am »
easiest way:

glxinfo | grep rendering

it should say:

Direct Rendering: Yes

which means you have 3D acceleration. If it says no, you don't, and it's probably a driver issue.

It might get some other stuff too, but only the Direct Rendering line matters.

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: WebGL Browser support
« Reply #9 on: November 10, 2012, 02:37:03 am »
sorunome-laptop% glxinfo | grep rendering
direct rendering: Yes

What's then the problem? D:

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: WebGL Browser support
« Reply #10 on: November 10, 2012, 02:43:13 am »
Hmmmmm.....

I'm assuming you have a method of installing packages from the AUR. If so, try installing google-chrome. That will be the official build, so it has the flash plugin, and it might handle webGL a bit differently. Worth a try, at least.

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: WebGL Browser support
« Reply #11 on: November 10, 2012, 02:44:16 am »
meh, i'd prefer a chromium solution as i love it, you know...... :(

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: WebGL Browser support
« Reply #12 on: November 10, 2012, 02:48:12 am »
Well, whatever.

What video card do you have? Is it an nvidia video card?

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: WebGL Browser support
« Reply #13 on: November 10, 2012, 02:51:16 am »
i am not sure, i didn't pay attention to hardware when buying the laptop D:

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: WebGL Browser support
« Reply #14 on: November 10, 2012, 02:51:56 am »
run this, please.

lspci | grep VGA