<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Mozilla Standards Blog &#187; Khronos</title>
	<atom:link href="http://blog.mozilla.com/standards/category/khronos/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.mozilla.com/standards</link>
	<description>Open Standards.  Open Source.  Open Platform.</description>
	<lastBuildDate>Thu, 13 May 2010 18:41:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Web Standards In the Device Era</title>
		<link>http://blog.mozilla.com/standards/2009/12/30/web-standards-in-the-device-era/</link>
		<comments>http://blog.mozilla.com/standards/2009/12/30/web-standards-in-the-device-era/#comments</comments>
		<pubDate>Wed, 30 Dec 2009 15:00:39 +0000</pubDate>
		<dc:creator>aruner</dc:creator>
				<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Khronos]]></category>
		<category><![CDATA[Standards]]></category>
		<category><![CDATA[W3C]]></category>
		<category><![CDATA[WHATWG]]></category>

		<guid isPermaLink="false">http://blog.mozilla.com/standards/?p=25</guid>
		<description><![CDATA[Last year, some prominent web developers weighed in on an increasingly spirited discussion about the App Store model versus The Web. Discussion about how to build really compelling mobile web applications that work on multiple mobile web browsers continues. But questions of market economics aside, some important technical questions crop up: is the web as [...]]]></description>
			<content:encoded><![CDATA[<p>Last year, some <a href="http://joehewitt.com/post/on-middle-men/">prominent web developers</a> weighed in on an <a href="http://www.quirksmode.org/blog/archives/2009/11/apple_is_not_ev.html">increasingly</a> <a href="http://almaer.com/blog/iphone-developers-are-not-arrogant-and-stupid">spirited</a> <a href="http://farukat.es/journal/2009/11/347-iphone-developers-arent-stupid-ppk">discussion</a> about the <em>App Store model</em> versus <em>The Web</em>.  Discussion about how to build really compelling mobile web applications that work on <a href="http://www.quirksmode.org/blog/archives/2010/02/the_iphone_obse.html#more">multiple mobile web browsers</a> continues.  But questions of market economics aside, some important technical questions crop up: is the web as <em>an application platform</em> capable of all the things we expect from a good platform?  How do web pages integrate with the devices that they run on, and how can even more APIs be coined?  And of course, the perennial: can the web platform (and web applications) replace the use of native code?</p>
<p>Let us define our terms.  We already know that many of the <em>really interesting</em> native applications in the mobile space (written, for example, in Objective C) make use of web technologies, either using established web APIs from third-party providers (making use of HTTP and JSON or markup payloads) or using HTML and CSS for presentation.  This is also true for applications on the desktop.  For example, the iTunes Music Store uses a <a href="http://www.satine.org/archives/2009/09/09/does-itunes-9-use-webkit/">browser-based presentation layer</a>.  We are <strong>not</strong> talking about that kind of use of web technologies here.  We are also <strong>not talking</strong> about <a href="http://www.w3.org/TR/widgets/">widgets</a> of <a href="http://www.apple.com/downloads/dashboard/">any kind</a> here.  Those are <em>web-like veneers</em>, but not quite <em>The Web</em> as we have in browsers, with the same security considerations of an HTML page served up from a URL.  What we are talking about here is web pages in a web browser.  Are we safely evolving capabilities that these need, so that future applications can safely take advantage of these capabilities?  Let&#8217;s take a look at a few of these capabilities, and how they fit in with the web page.</p>
<p><span id="more-25"></span></p>
<p>Before the advent of <a href="http://www.w3.org/TR/FileAPI/">HTML5 File API</a>, integration with the underlying file system was pretty primitive: you&#8217;d use the <code>&lt;input type="file" /&gt;</code> element in forms, and couldn&#8217;t really do much <em>with</em> the selected file.  Now that Firefox 3.6 implements the File API, you can do stuff like <em>asynchronously</em> <a href="http://hacks.mozilla.org/2009/12/firefox-36-fileapi-demo-reading-exif-data-from-a-local-jpeg-file/">examine the EXIF content of an image</a>, or the ID3 tags within an MP3 file.  The asynchronous part is important &#8212; we don&#8217;t want a page to block on read operations, especially on the main thread. While there is the introduction of a new top level object (<a href="https://developer.mozilla.org/en/DOM/FileReader"><code>FileReader</code></a>), the actual file is selected only by user interaction with the standard <code>&lt;input type="file"&gt;</code> element.  <a href="http://www.w3.org/DOM/">DOM</a> methods are used to access the selected file data from the <em>file element</em>.  The resulting API integrates with the web page&#8217;s intrinsic element-based model, using the DOM to obtain a handle to the data, and asynchronous read operations on top of it.    The new device capability is a natural extension of the web page model.</p>
<p>In addition to being able to access the device&#8217;s native file system, <em>hardware acceleration for graphics</em> is another important area for the web to take advantage of, especially with Graphical Processing Units (GPUs) becoming more sophisticated, and with driver support for <a href="http://www.khronos.org/opengles/">OpenGL ES 2.0</a> become more prevalent.  We&#8217;ve already seen <a href="http://www.watersheep.org/~markh/html_canvas/game.html">really creative uses</a> of the <a href="https://developer.mozilla.org/en/Canvas_tutorial">HTML5 Canvas2D drawing API </a>on the web.  The next task was to take the same HTML5 Canvas element, and provide interfaces to access hardware-accelerated 3D graphics.  This is what <a href="http://webgl.org">WebGL</a> does: it takes the same notion of providing an &#8220;immediate mode&#8221; drawing context made available to 2D graphics in JavaScript, and adds support for a 3D API (which closely resembles <a href="http://www.khronos.org/opengles/">OpenGL ES 2.0</a>, but with judicious concessions made for how the API would look like in a memory-managed language like JavaScript).  Again, the goal is integration with the web.  WebGL relies on the Canvas element (a part of the DOM), and provides interfaces to programmatically draw into the Canvas.</p>
<p>Both <a href="http://webgl.org">WebGL</a> and the <a href="http://www.w3.org/TR/FileAPI/">File API</a> provide examples of <em>integrating device capabilities</em> with an existing HTML element.  Other device capabilities also integrate with <a href="http://www.w3.org/TR/DOM-Level-3-Events/#dom-event-architecture">DOM Events</a>, the event model for web pages.  For instance, the <a href="https://developer.mozilla.org/En/DragDrop/Drag_and_Drop">HTML5 Drag and Drop API</a>, which allows you to <a href="http://hacks.mozilla.org/category/drag-and-drop/">drag resources from your device</a> to a web page, generates events that a web page can listen for, a model that web developers have been familiar with ever since the introduction of <a href="https://developer.mozilla.org/en/DOM/element.onclick"><code>onclick</code></a> back in JavaScript&#8217;s infancy.  And then, there&#8217;s <a href="http://hacks.mozilla.org/2009/10/orientation-for-firefox/">Orientation Events</a>, supported in Firefox 3.6 (with <a href="http://dougt.org/random/orientationdemo/index.xhtml">a really compelling demo</a> &#8212; try it on the MacBook Pro or the Nokia N900 and Fx 3.6).  Every time you tilt or &#8220;orient&#8221; your device, the web page can listen to events and do something interesting accordingly.  While the<a href="http://hacks.mozilla.org/2009/10/orientation-for-firefox/"> Orientation API</a> isn&#8217;t yet a web standard, we&#8217;d welcome further discussion with other browser vendors about it.  These device capabilities integrate with the web page&#8217;s event model, just as other device capabilities integrate with the HTML element structure.</p>
<p>The <a href="https://developer.mozilla.org/En/Using_geolocation">W3C Geolocation API</a> is one device capability that isn&#8217;t integrated with the DOM of a page, or its event model.  Rather, it is an extension to the <code>navigator</code> object, and provides an <em>asynchronous API</em> to get access to the device&#8217;s location, and (after user consent is obtained), provides that information back to the web page.  It is now used by <a href="http://www.twitter.com/">Twitter</a>, <a href="http://maps.google.com/">Google Maps</a>, and <a href="http://www.flickr.com/maps">Flickr</a>, to name a few (run these web applications on Firefox 3.6).  This is an asynchronous API; user-consent is also obtained asynchronously, blocking the feature until the user grants consent.  We posited some of these principles as <a href="http://arunranga.com/articles/2008/position-paper.html"><em>general design guidelines for Device APIs</em></a> just before the formation of the nascent <a href="http://www.w3.org/2009/05/DeviceAPICharter.html">W3C Device APIs WG</a>, which we&#8217;re a tentative member of.</p>
<p>Web pages are becoming <em>more and more capable</em>, and some of the need for proprietary plugins can be obviated.  When we consider further device capabilities, we&#8217;re really looking for:</p>
<ul>
<li>An asynchronous design</li>
<li>Whether the new capability can integrate with a known HTML element as a starting point.  We&#8217;re watching the evolution of the <a href="http://dev.w3.org/html5/html-device/">HTML5 <code>&lt;device&gt;</code></a> stuff pretty closely.</li>
<li>Whether the new capability can integrate with the event model for web pages.</li>
<li>And finally, whether we need a new top level object</li>
</ul>
<p>We want the web of web pages and hyperlinked applications to be the platform of choice for developers, based on open standards and a well-understood security model.  Whether this will eventually supplant native platforms is an open question, but talk of a web operating system is <a href="http://developer.palm.com/">popular</a> in <a href="http://dev.chromium.org/chromium-os">some circles</a>.  </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mozilla.com/standards/2009/12/30/web-standards-in-the-device-era/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>WebGL Draft Released Today</title>
		<link>http://blog.mozilla.com/standards/2009/12/10/webgl-draft-released-today/</link>
		<comments>http://blog.mozilla.com/standards/2009/12/10/webgl-draft-released-today/#comments</comments>
		<pubDate>Thu, 10 Dec 2009 22:14:03 +0000</pubDate>
		<dc:creator>aruner</dc:creator>
				<category><![CDATA[Khronos]]></category>
		<category><![CDATA[Standards]]></category>

		<guid isPermaLink="false">http://blog.mozilla.com/standards/?p=33</guid>
		<description><![CDATA[(cross-posted from hacks.mozilla.org) Even without a draft specification of WebGL in circulation, we&#8217;ve seen some promising 3D content using WebGL appear on the web, put together mainly through developer ingenuity and the fact that Firefox, Chromium, and WebKit are open source projects with early support for the technology. Today, the WebGL Working Group at Khronos [...]]]></description>
			<content:encoded><![CDATA[<p>(cross-posted from <a href="http://hacks.mozilla.org/">hacks.mozilla.org</a>)</p>
<p>Even without a draft specification of WebGL in circulation, we&#8217;ve seen some <a href="http://hacks.mozilla.org/2009/12/webgl-goes-mobile/">promising</a> <a href="http://hacks.mozilla.org/2009/09/three-more-webgl-demos/">3D</a> <a href="http://hacks.mozilla.org/2009/10/webgl-in-the-wild/">content</a> using WebGL appear on the web, put together mainly through developer ingenuity and the fact that Firefox, Chromium, and WebKit are open source projects with early support for the technology.  Today, the <a href="http://khronos.org/webgl">WebGL Working Group at Khronos</a> released a <a href="https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/doc/spec/WebGL-spec.html">provisional public draft of the WebGL specification</a>, and we are very excited for what this means for the web.</p>
<p>For one thing, it means more developers can get involved in the evolution of <a href="https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/doc/spec/WebGL-spec.html">WebGL</a>.  There&#8217;s a <a href="https://www.khronos.org/webgl/public-mailing-list/">public mailing</a> list set up, so that you can engage directly with members of the <a href="http://khronos.org/webgl">WebGL Working Group</a>, as well as a <a href="http://www.khronos.org/message_boards/viewforum.php?f=35">web forum</a>.  It&#8217;s important to note that the specification is not yet finalized.  Participation from the web community is essential towards finalizing the specification, which we hope to do in the first quarter of 2010.</p>
<p>It also means that there are implementations of the draft specification that you can begin to test.  You can obtain a <a href="http://nightly.mozilla.org/">Firefox nightly</a> that implements the <a href="https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/doc/spec/WebGL-spec.html">WebGL draft specification</a>, and can turn on WebGL support in that build by following these steps:</p>
<ul>
<li>Type &#8220;<code>about:config</code>&#8221; in your browser&#8217;s URL bar</li>
<li>Do a search for &#8220;webgl&#8221; in the <em>Filter</em> field</li>
<li>Double-click the &#8220;<code>enabled_for_all_sites</code>&#8221; preference to change it to &#8220;<code>true</code>&#8221; </li>
</ul>
<p>Other browsers that support the draft <a href="https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/doc/spec/WebGL-spec.html">WebGL specification</a> are listed on the <a href="http://khronos.org/webgl/wiki/">WebGL Wiki</a>.</p>
<p>Now of course, this is hardware-accelerated 3D graphics in an early beta, and for now requires an OpenGL 2.0-capable GPU and drivers. In particular, most flavors of Intel&#8217;s integrated GPUs will not work straight out of the box (such as the GMA900/GMA950 often found in laptops).  Developers who build nightly builds of the browser can induce <em>software rendering</em> using <a href="http://www.mesa3d.org/">Mesa</a>, and should check out Vlad&#8217;s <a href="http://blog.vlad1.com/2009/09/21/webgl-samples/">blog post</a> for doing this on Windows.  <strong>Caveat emptor:</strong> building software rendering using Mesa into a Firefox nightly is likely to yield slower performance, and is only for the intrepid. </p>
<p><a href="https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/doc/spec/WebGL-spec.html">WebGL</a> is a royalty-free, cross-platform API that brings <a href="http://www.khronos.org/opengles/">OpenGL ES 2.0</a> to the web as a 3D drawing context within <a href="https://developer.mozilla.org/en/HTML/Canvas">HTML5&#8242;s Canvas element</a>, exposed as low-level interfaces within the Document Object Model.  </p>
<p>Developers familiar with the <a href="https://developer.mozilla.org/en/Drawing_Graphics_with_Canvas">Canvas 2D context</a> will recognize that WebGL as another context for Canvas:</p>
<pre lang="javascript">
// get the canvas element in the DOM
var canvas = document.getElementById("canvas3D");
var gl = canvas.getContext("experimental-webgl");
</pre>
<p><strong>Note</strong> that till the <a href="https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/doc/spec/WebGL-spec.html">specification</a> is finalized, the context is called <code>experimental-webgl</code>.</p>
<p>WebGL uses the OpenGL shading language, GLSL ES, and can be cleanly combined with other web content that is layered on top or underneath the 3D content.  It is an <em>emerging web standard</em>, and is designed to be used with other parts of the web platform.  The release of<a href="https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/doc/spec/WebGL-spec.html"> the draft specification</a> is one step in bringing about a <em>plugin free</em> 3D API to the web, usable straight out of the box.  People have already begun using it to create compelling libraries.  Check out <a href="http://www.x3dom.org/">X3DOM</a>, which is a JavaScript library using WebGL that allows users to author content in <a href="http://www.web3d.org/x3d/">X3D</a>.  We expect developer ingenuity to surprise and awe us, as it always has.</p>
<p><strong>References</strong></p>
<ul>
<li>Review the <a href="https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/doc/spec/WebGL-spec.html">WebGL draft specification</a></li>
<li>Get involved!  <a href="http://khronos.org/webgl">WebGL Homepage on Khronos</a></li>
<li>Read articles and contribute on the <a href="http://khronos.org/webgl/wiki">WebGL Wiki</a></li>
<li>A blog about <a href="http://learningwebgl.com/blog/">learning WebGL</a></li>
<li>Find 3D recipes in the <a href="http://learningwebgl.com/cookbook/index.php/Main_Page">learning WebGL Cookbook</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.mozilla.com/standards/2009/12/10/webgl-draft-released-today/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>3D on the Web</title>
		<link>http://blog.mozilla.com/standards/2009/03/25/3d-on-the-web/</link>
		<comments>http://blog.mozilla.com/standards/2009/03/25/3d-on-the-web/#comments</comments>
		<pubDate>Wed, 25 Mar 2009 13:01:54 +0000</pubDate>
		<dc:creator>aruner</dc:creator>
				<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Khronos]]></category>
		<category><![CDATA[Standards]]></category>

		<guid isPermaLink="false">http://blog.mozilla.com/standards/?p=15</guid>
		<description><![CDATA[Bringing accelerated 3D Graphics for the web holds the promise of new types of web applications.]]></description>
			<content:encoded><![CDATA[<p>Yesterday at the <a href="http://www.gdconf.com/index.html">Game Developers Conference</a> in San Francisco, Mozilla and the <a href="http://www.khronos.org/">Khronos Group</a> (the folks behind the OpenGL family of standards) announced <a href="http://www.khronos.org/news/press/releases/khronos-launches-initiative-for-free-standard-for-accelerated-3d-on-web/">a new initiative to bring accelerated 3D graphics to the web</a>.  This is a promising new direction for web applications, and adds to the rich mix of activities in forum such as the <a href="http://www.w3.org">W3C</a> and <a href="http://www.whatwg.org/">WHATWG</a> to evolve the web platform.</p>
<p>JavaScript performance in all major browsers has shown marked improvements over time, paving the way for it to be used for more sophisticated classes of applications.  Many graphics applications, including popular games, leverage hardware acceleration, and subsets of OpenGL (such as OpenGL ES1.1) are already available on smartphones.  The initial activity proposal is to consider a simple binding of <a href="http://www.khronos.org/opengles/">OpenGL ES2.0</a> to JavaScript, and exposing that to an <a href="http://dev.w3.org/html5/spec/Overview.html#the-2d-context">HTML5 Canvas context</a>.  This is how a 2D drawing context is exposed to the web for use with a JavaScript API; the proposed mechanism is to do this for a 3D context as well.  As exciting as this is for the web and for us at Mozilla, it&#8217;s worth explaining our choices, and raising some questions.</p>
<p><span id="more-15"></span></p>
<p>We chose <a href="http://www.khronos.org/">Khronos</a> to start with, since that&#8217;s the home of OpenGL, and the proposal is to start with an OpenGL subset such as OpenGL ES2.0.  This is a very low-level API with a lot of C language structures, and perhaps an early task for the working group would be to figure out <a href="http://people.mozilla.com/~vladimir/misc/glweb20spec.html">how to expose that to JavaScript</a>.  This isn&#8217;t a <em>fait accompli</em>, and we look forward to help and collaboration from other major players.  Naturally, security is a <em>paramount consideration</em>.   <a href="http://google-code-updates.blogspot.com/2009/03/toward-open-web-standard-for-3d.html">Google announced support for the activity</a>, and we look forward to others doing so soon as well.</p>
<p>Would web developers <em>actually use</em> something this low level?  While we anticipate the influx of a new type of web developer (who may also be a games developer, or interested in 3D visualization), it&#8217;s worth pointing out that a standardization principle that&#8217;s served the web well is to expose pretty low level primitives in browsers, and allow third party JavaScript libraries to take on the task of syntactic sugar and higher level abstractions.  Applications toolkits such as <a href="http://www.dojotoolkit.org/">dojo</a>, <a href="http://jquery.com/">jQuery</a>, and <a href="http://www.prototypejs.org/">Prototype</a> simplify developers lives; the same can occur in the 3D arena. </p>
<p>It&#8217;s also worth pointing out that this endeavor with Khronos to bring a subset of OpenGL to the web is just the first step.  Higher level APIs with retained mode graphics are likely to follow suit.  The discussion officially started yesterday, so we&#8217;re glowing with fresh possibility in uncharted terrain here.</p>
<p>Also read <a href="http://blog.vlad1.com/2009/03/24/3d-on-the-web-its-go-time/">Vlad&#8217;s thoughts on all this</a> &#8212; he <a href="http://blog.vlad1.com/canvas-3d/">wrote the extension</a> that was the initial experimental implementation, and made this happen.  And <a href="http://www.0xdeadbeef.com/weblog/?p=1207">Chris Blizzard&#8217;s thoughts</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mozilla.com/standards/2009/03/25/3d-on-the-web/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

