Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(627)

Unified Diff: samples/openglui/web/gl_driver.dart

Issue 12186002: Canvas API. There are still a number of things to do: (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: samples/openglui/web/gl_driver.dart
===================================================================
--- samples/openglui/web/gl_driver.dart (revision 17737)
+++ samples/openglui/web/gl_driver.dart (working copy)
@@ -10,16 +10,22 @@
/**
* A driver to run GL applications in the browser.
*/
-void glMain(setup, resize, draw) {
+
+bool is3d = false;
+
+void glMain(setup, resize, draw, onMotionDown) {
// Setup a Canvas for GL to run inside.
final canvas = new CanvasElement(width: window.innerWidth, height: window.innerHeight);
document.body.nodes.add(canvas);
- gl = canvas.getContext('experimental-webgl');
+ // gl = canvas.getContext('experimental-webgl');
// The first 'setup' entry point is called once.
- setup(canvas.width, canvas.height);
+ setup(canvas, canvas.width, canvas.height);
+ canvas.on.mouseDown.add((e) {
+ onMotionDown(0, 0, 0);
+ });
// The second 'render' entry point is called each time the canvas should
// be re-drawn.
var render;

Powered by Google App Engine
This is Rietveld 408576698