pouët.net

Web GL

category: code [glöplog]
So, where is the first WebGL intro? Can't believe it's taking so long :) :)

I want a javascript compressor/mentoizer, and spread 4k intros all over the blogs of the internet instead of crappy youtube videos or links to obscure sites and zip files.

Who's gonna be the first to make a WebGLRayMarcher? GUYS??
added on the 2009-12-16 08:28:40 by iq iq
is it already usable and stable?
added on the 2009-12-16 08:37:28 by toxie toxie
I think the biggest showstopper is WebGL being still under development :). But why not, getting FF 3.7 as I type.
added on the 2009-12-16 08:39:44 by decipher decipher
Firefox 3.7a1pre (Minefield) has out-of-box support for WebGL it needs to be enabled from about:config, search for webgl and change webgl.enabled_for_all_sites to true. Afterwards, you have WebGL :).
added on the 2009-12-16 08:47:30 by decipher decipher
it needs direct framebuffer support. right now it's composited by the browser with software rendering..
so it's pretty slow in big resolutions.
added on the 2009-12-16 09:30:47 by jaw jaw
seems to work, yes (Win32 XP SP3)

Btw, there is already a port of a 4k intro : https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/sdk/demos/google/san-angeles/index.html

I will port some of the kinderintros to see how it feels coding for web.
added on the 2009-12-16 09:31:03 by iq iq
I wouldn't trust an alpha version called "minefield" very much...
added on the 2009-12-16 09:31:33 by raer raer
first time i hear about it BUT it is great news no more flash and its weird AS that changes almost with every version or so \o/
added on the 2009-12-16 10:11:42 by panic panic
Quote:
I want a javascript compressor/mentoizer, and spread 4k intros all over the blogs of the internet instead of crappy youtube videos or links to obscure sites and zip files.


Me too! =)
added on the 2009-12-16 10:39:06 by ham ham
Also, first time I hear about it as well... curiously I was searching for hardware accelerated 3d gfx for browsers, apparently I was searching in the wrong place. I thought that I could use silverlight or a Java applet to somehow bind opengl/directx functions... but this is much better. Ill take a closer look to it.
added on the 2009-12-16 11:15:24 by xTr1m xTr1m
A few weeks ago I heard about flaws in WebGL that allowed to BSOD any Windows machine. I hope these are addressed in this public draft.
added on the 2009-12-16 11:56:02 by p01 p01
I would really like to contribute to this conversation, but I promised Gargaj not to contribute to this site anymore (being this the exception).
added on the 2009-12-16 13:11:58 by mrdoob mrdoob
Is there any API documentation around?
Is it base on OpenGL 3.0? ES 1.1? 2.0? Whatever's available?
added on the 2009-12-16 13:21:08 by xernobyl xernobyl
@xernobyl:

It's based on OpenGL ES 2.0.
Check this site with info.
added on the 2009-12-16 13:51:17 by ham ham
JavaScript & HTML do not have their Crinkler, yet. Although all the minifiers, packers and refactoring tools available you really need to get your hands dirty if you want to make a decent intro using open web standards.

I looked a bit at the port of San Angeles and got the code around 5KB
added on the 2009-12-16 16:37:58 by p01 p01
Cool :) i have san andreas working (latest webkit nightly build on osx), but chocolux doesn't work. I have a radeon 2400 here, slow but I'm pretty sure it's ps3.0 compliant. Any clues?

On a slightly tangential note, it's been possible to do similar (well, hardware accelerated 3d) stuff for a while using quartz composer + safari on osx. Problem there is it's only supported in safari/osx. If you happen to have that combination, there's a pixel shader mandelbrot explorer i made yesterday here: http://kineme.net/files/Mandelbrot.qtz
added on the 2009-12-16 17:21:57 by psonice psonice
Firefox 3.7a1pre Nightly Build as well, Chocolux doesn't run but San Angeles Observation is golden.
added on the 2009-12-16 17:30:33 by decipher decipher
same here.

p01, what do you know about (synthetized) sound in js?

added on the 2009-12-16 18:27:29 by iq iq
iq: I made a little research today and JavaScript can play wave files on an audio-enabled browser so, I think we only need to figure out a way to stream the sound and we can just insert the headers and play it as if it was a WAV file. I think at that point it depends on JavaScript's definition of a "file". Is it a bytestream (as in C++ fstream which is an iostream which is istream / ostream…) or is it otherwise.
added on the 2009-12-16 19:15:01 by decipher decipher
I know that I managed to make a proof of concept soft synth with envelope, multiple oscillators, LFO & delay, ... 3.5 years ago by generating WAVE PCM files as data: URI. Doing something like:
Code: var audio = new Audio(); audio.onload = function(){ this.play(); } audio.src = 'data:audio/wave,'+ generateAwesomeTune();
Today, more browsers support, to some extent, HTML5 Audio but not all of them support WAVE PCM, and generating an OGG in JS is kinda out of question.
added on the 2009-12-16 20:20:29 by p01 p01
In addition to p01, I also experimented with bgsound (for IE) and embed (for Firefox et al.), and I think if a separate file with the extension .wav is used and it sends the WAV headers after setting the mime type to WAVE PCM via JavaScript, it looks like it would work. So far, I managed to play sounds using these at the background when I get back home I will experiment with the generated .wav files which are in fact JavaScript files with a faux-mime.
added on the 2009-12-16 20:24:11 by decipher decipher
p01: Can't you put uncompressed audio in an OGG stream?
added on the 2009-12-16 20:28:08 by doomdoom doomdoom
Doom: Haven't tried that. Anyway for now there's no single format supported by all 3 browsers ( Opera, Firefox, Webkit ) that support HTML5 Audio.
added on the 2009-12-16 21:58:31 by p01 p01
Nutman and I released a JS sound experiment at TRSAC using the audio tag and generated samples. You can check it out at http://www.irishq.dk/throwback.html (should work in FF 3.5 and Mac versions of Safari). Given more time to optimize code and data, and applying runtime decompression we could probably have gotten it down under 4KB.
added on the 2009-12-16 23:22:37 by Ransom Ransom

login