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

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, 10 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
« no previous file with comments | « samples/openglui/web/canvas_tests.html ('k') | samples/openglui/web/openglui_canvas_tests_driver.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « samples/openglui/web/canvas_tests.html ('k') | samples/openglui/web/openglui_canvas_tests_driver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698