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

Unified Diff: samples/o3d-webgl/client.js

Issue 1798006: Thanks to gman, fixed o3d.webgl.createClient and o3d-webgl Client to handle... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/o3d/
Patch Set: Created 10 years, 8 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/o3d-webgl-samples/simpleviewer/simpleviewer.html ('k') | samples/o3djs/webgl.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/o3d-webgl/client.js
===================================================================
--- samples/o3d-webgl/client.js (revision 45712)
+++ samples/o3d-webgl/client.js (working copy)
@@ -103,6 +103,7 @@
renderEvent.elapsedTime = 0.0;
else
renderEvent.elapsedTime = now - client.then_;
+ client.updateDisplayInfo_();
if (client.render_callback) {
client.render_callback(renderEvent);
}
@@ -538,8 +539,7 @@
this.gl = gl;
gl.client = this;
- gl.displayInfo = {width: canvas.width,
- height: canvas.height};
+ this.updateDisplayInfo_();
};
@@ -890,3 +890,11 @@
o3d.Client.prototype.canvas = null;
+/**
+ * Updates the display information attached to the GL.
+ * @private
+ */
+o3d.Client.prototype.updateDisplayInfo_ = function() {
+ this.gl.displayInfo = {width: this.width,
+ height: this.height};
+};
« no previous file with comments | « samples/o3d-webgl-samples/simpleviewer/simpleviewer.html ('k') | samples/o3djs/webgl.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698